本文整理汇总了PHP中ADODB_Session::open方法的典型用法代码示例。如果您正苦于以下问题:PHP ADODB_Session::open方法的具体用法?PHP ADODB_Session::open怎么用?PHP ADODB_Session::open使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ADODB_Session
的用法示例。
在下文中一共展示了ADODB_Session::open方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct($conn_options, $persist = TRUE, $debug = FALSE, $sess_table = 'sessao')
{
$ret = FALSE;
list($host, $database, $user, $password, $port) = array_values($conn_options);
$host .= ':' . $port;
$options['table'] = $sess_table;
$this->session_table = $sess_table;
ADOdb_Session::config('postgres', $host, $user, $password, $database, $options);
ADODB_Session::open(false, false, $connectMode = $persist);
if (isset($GLOBALS['ADODB_SESS_CONN']) && is_object($GLOBALS['ADODB_SESS_CONN'])) {
ADOdb_session::Persist($connectMode = $persist);
$GLOBALS['ADODB_SESS_CONN']->debug = $debug;
// limpa outras sessoes expiradas e inativas por mais de 15 minutos (padr�o)
$this->clear_expired_sessions();
@session_start();
}
}
示例2: adodb_sess_open
function adodb_sess_open($save_path, $session_name, $persist = true)
{
return ADODB_Session::open($save_path, $session_name, $persist);
}
示例3: define
*
* @author Organisation: Queen's University
* @author Unit: School of Medicine
* @author Developer: Matt Simpson <matt.simpson@queensu.ca>
* @copyright Copyright 2010 Queen's University. All Rights Reserved.
*
*/
$ADODB_QUOTE_FIELDNAMES = true;
// Whether or not you want ADOdb to backtick field names in AutoExecute, GetInsertSQL and GetUpdateSQL.
define("ADODB_QUOTE_FIELDNAMES", $ADODB_QUOTE_FIELDNAMES);
// Information required to start a new database connection.
$db = NewADOConnection(DATABASE_TYPE);
$db->Connect(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME);
$db->SetFetchMode(ADODB_FETCH_ASSOC);
if (defined("DEFAULT_CHARSET") && isset($ENTRADA_CHARSETS) && is_array($ENTRADA_CHARSETS) && array_key_exists(DEFAULT_CHARSET, $ENTRADA_CHARSETS)) {
$db->Execute("SET NAMES " . $db->qstr($ENTRADA_CHARSETS[DEFAULT_CHARSET]["mysql_names"]) . " COLLATE " . $db->qstr($ENTRADA_CHARSETS[DEFAULT_CHARSET]["mysql_collate"]));
}
$db->debug = isset($DEVELOPER_IPS) && is_array($DEVELOPER_IPS) && isset($_SERVER["REMOTE_ADDR"]) && in_array($_SERVER["REMOTE_ADDR"], $DEVELOPER_IPS) && isset($_GET["debug"]) ? true : false;
@ini_set("session.name", SESSION_NAME);
@ini_set("session.gc_maxlifetime", SESSION_EXPIRES);
if (defined("ADODB_SESSION") && defined("DATABASE_SESSIONS") && DATABASE_SESSIONS) {
require_once "Entrada/adodb/session/adodb-session2.php";
ADODB_Session::config(SESSION_DATABASE_TYPE, SESSION_DATABASE_HOST, SESSION_DATABASE_USER, SESSION_DATABASE_PASS, SESSION_DATABASE_NAME, array("table" => "sessions"));
ADODB_Session::encryptionKey(ENCRYPTION_KEY);
ADODB_Session::open(false, false, false);
ADODB_Session::optimize(true);
ADODB_Session::expireNotify(array("PROXY_ID", "expired_session"));
session_start();
} else {
session_start();
}