当前位置: 首页>>代码示例>>PHP>>正文


PHP fSession::setPath方法代码示例

本文整理汇总了PHP中fSession::setPath方法的典型用法代码示例。如果您正苦于以下问题:PHP fSession::setPath方法的具体用法?PHP fSession::setPath怎么用?PHP fSession::setPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在fSession的用法示例。


在下文中一共展示了fSession::setPath方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: error_reporting

<?php

error_reporting(E_ALL & ~E_NOTICE);
include __DIR__ . '/load_flourish.php';
include __DIR__ . '/load_plugins.php';
require __DIR__ . '/config.php';
require __DIR__ . '/core.php';
fSession::setPath(SESSIONS_PATH);
fSession::setLength('1 day 2 hours');
$db = new fDatabase('mysql', DB_NAME, DB_USER, DB_PASS, DB_HOST);
fAuthorization::setLoginPage(LOGIN_BASE);
开发者ID:daerduoCarey,项目名称:xiaoyou,代码行数:11,代码来源:init.php

示例2: ob_start

<?php

ob_start();
require_once 'config.php';
require_once 'user.php';
require_once 'transaction.php';
require_once 'card.php';
$db = new fDatabase('sqlite', dirname(__FILE__) . '/../var/database.db');
fORMDatabase::attach($db);
fSession::setLength('30 minutes', '1 week');
fSession::setPath(dirname(__FILE__) . '/../var/session');
if ($uid = fSession::get('user')) {
    $user = new User($uid);
} else {
    $user = null;
}
开发者ID:russss,项目名称:hackspace-foundation-sites,代码行数:16,代码来源:init.php

示例3: define

<?php

define('DOC_ROOT', realpath(dirname(__FILE__) . '/../'));
define('URL_ROOT', path_fix(substr(DOC_ROOT, strlen(realpath($_SERVER['DOCUMENT_ROOT'])))) . '/');
define('URL_ROOT_TRIM', ltrim(URL_ROOT, "\\"));
error_reporting(E_STRICT | E_ALL);
fCore::enableErrorHandling('html');
fCore::enableExceptionHandling('html');
fTimestamp::setDefaultTimezone('Asia/Kuala_Lumpur');
fAuthorization::setLoginPage(URL_ROOT . 'authentication.php');
fAuthorization::setAuthLevels(array('super' => 1000, 'admin' => 100, 'user' => 50, 'guest' => 25));
// This prevents cross-site session transfer
fSession::setPath(DOC_ROOT . '/session/');
include DOC_ROOT . '/resources/library/flourish/constructor_functions.php';
/**
 * Configuration Settings
 *
 */
$config = array("db" => array("dbName" => "umw_mms", "dbHost" => "localhost", "dbUsername" => "useradmin", "password" => "test0"), "title" => "Material Management System", "version" => "v2.00b");
/**
 * Automatically includes classes
 * 
 * @throws Exception
 * 
 * @param  string $class  Name of the class to load
 * @return void
 */
function __autoload($class)
{
    $flourish_file = DOC_ROOT . '/resources/library/flourish/' . $class . '.php';
    if (file_exists($flourish_file)) {
开发者ID:JhunCabas,项目名称:material-management,代码行数:31,代码来源:config.php

示例4: array

    $tpl->set('header', 'header.php');
    $tpl->set('footer', 'footer.php');
    $tpl->set('menu', 'menu.php');
    // @TODO remove these when the thresholds become configurable.
    global $status;
    $status[3] = array('OK', '73D216');
    // 3+ OK
    $status[2] = array('Low', 'EDD400');
    // 2+ Warning
    $status[0] = array('Critical', 'CC0000');
    // 0: Empty - bad.
    // Set up database connection
    $db = new fDatabase('mysql', config_item('db_name'), config_item('db_user'), config_item('db_pass'), config_item('db_host'), config_item('db_port'));
    fORMDatabase::attach($db);
    // Configure session
    fSession::setPath(config_item('session_path'));
    fSession::setLength(config_item('session_length', '1 hour'));
    fSession::open();
}
/**
 * Automatically includes classes
 *
 * @throws Exception
 *
 * @param  string $class_name  Name of the class to load
 * @return void
 */
function printmaster_autoload($class)
{
    $flourish_file = DOC_ROOT . '/inc/flourish/' . $class . '.php';
    if (file_exists($flourish_file)) {
开发者ID:mrjwc,项目名称:printmaster,代码行数:31,代码来源:core.php

示例5: array

    print $config_error;
    exit;
}
$status_array = array('0' => 'OK', '1' => 'Error', '2' => 'Warning');
$visibility_array = array('0' => 'Public', '1' => 'Private');
$over_under_array = array('0' => 'Over', '1' => 'Under');
$breadcrumbs = array();
$breadcrumbs[] = array('name' => 'Home', 'url' => '#', 'active' => false);
error_reporting(E_STRICT | E_ALL);
fCore::enableErrorHandling('html');
fCore::enableExceptionHandling('html');
fTimestamp::setDefaultTimezone($GLOBALS['TIMEZONE']);
fAuthorization::setLoginPage(User::makeURL('login'));
fAuthorization::setAuthLevels(array('admin' => 100, 'user' => 50, 'guest' => 25));
// This prevents cross-site session transfer
fSession::setPath($GLOBALS['SESSION_FILES']);
if (!fAuthorization::checkLoggedIn()) {
    if ($GLOBALS['ALLOW_HTTP_AUTH'] && (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW']))) {
        unset($_SERVER['PHP_AUTH_PW']);
        //no need for a clear text password hanging around.
        try {
            $user = new User(array('username' => $_SERVER['PHP_AUTH_USER']));
            // Auto Register User
            fAuthorization::setUserToken($user->getEmail());
            fAuthorization::setUserAuthLevel($user->getRole());
            fSession::set('user_id', $user->getUserId());
            fSession::set('user_name', $user->getUsername());
        } catch (fNotFoundException $e) {
            if (fURL::getWithQueryString() != TATTLE_WEB_ROOT . User::makeURL('add')) {
                fMessaging::create('affected', User::makeURL('add'), $_SERVER['PHP_AUTH_USER']);
                fMessaging::create('success', User::makeURL('add'), 'The user ' . $_SERVER['PHP_AUTH_USER'] . ' was successfully created');
开发者ID:nleskiw,项目名称:Graphite-Tattle,代码行数:31,代码来源:config.php

示例6: define

    $config_error .= "<br/>Tattle Error <br />" . "Bootstrap library not found : expected at : " . $root_path . BOOTSTRAP_PATH . "<br />" . "Can be changed in inc/config.php : BOOTSTRAP_PATH";
    $config_exit = true;
}
if ($config_exit) {
    print $config_error;
    exit;
}
define('VIEW_PATH', $root_path . '/views/');
$status_array = array('0' => 'OK', '1' => 'Error', '2' => 'Warning');
$visibility_array = array('0' => 'Public', '1' => 'Private');
$over_under_array = array('0' => 'Over', '1' => 'Under');
$breadcrumbs = array();
$breadcrumbs[] = array('name' => 'Home', 'url' => '#', 'active' => false);
error_reporting(E_STRICT | E_ALL);
fCore::enableErrorHandling('html');
fCore::enableExceptionHandling('html');
fTimestamp::setDefaultTimezone('America/New_York');
fAuthorization::setLoginPage(User::makeURL('login'));
fAuthorization::setAuthLevels(array('admin' => 100, 'user' => 50, 'guest' => 25));
// This prevents cross-site session transfer
fSession::setPath(SESSION_FILES_PATH);
$plugin_settings = array();
foreach (glob("plugins/*_plugin.php") as $plugin) {
    include_once $plugin;
    $plugin_name = str_replace(array('plugins/', '_plugin.php'), '', $plugin);
    $plugin_config = $plugin_name . '_config';
    if (function_exists($plugin_config)) {
        $plugin_settings[$plugin_name] = $plugin_config();
        $send_methods[$plugin_name] = $plugin_settings[$plugin_name]['name'];
    }
}
开发者ID:rberger,项目名称:Graphite-Tattle,代码行数:31,代码来源:config.php


注:本文中的fSession::setPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。