本文整理匯總了PHP中Update::page_header方法的典型用法代碼示例。如果您正苦於以下問題:PHP Update::page_header方法的具體用法?PHP Update::page_header怎麽用?PHP Update::page_header使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Update
的用法示例。
在下文中一共展示了Update::page_header方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
require PATH_DB . 'db.' . $conf['db_type'] . EXT;
$db_config = array('hostname' => $conf['db_hostname'], 'username' => $conf['db_username'], 'password' => $conf['db_password'], 'database' => $conf['db_name'], 'prefix' => $conf['db_prefix'], 'conntype' => $conf['db_conntype'], 'debug' => 1, 'show_queries' => FALSE, 'enable_cache' => FALSE);
$DB = new DB($db_config);
$DB->error_header = "<div class='error'>Error: The following error was encountered</div>";
$DB->error_footer = Update::page_footer();
if (!$DB->db_connect(0)) {
exit("Database Error: Unable to connect to your database. Your database appears to be turned off or the database connection settings in your config file are not correct. Please contact your hosting provider if the problem persists.");
}
if (!$DB->select_db()) {
exit("Database Error: Unable to select your database");
}
// Check for "strict mode", some queries used are incompatible
if (version_compare(mysql_get_server_info(), '4.1-alpha', '>=')) {
$mode_query = $DB->query("SELECT CONCAT(@@global.sql_mode, @@session.sql_mode) AS sql_mode");
if (strpos(strtoupper($mode_query->row['sql_mode']), 'STRICT') !== FALSE) {
Update::page_header();
$DB->db_error("Database Error: ExpressionEngine will not run on a MySQL server operating in strict mode");
}
}
// ------------------------------
// Instantiate the Update class
// ------------------------------
$UD = new Update();
$UD->conf = $conf;
$UD->update_manager();
class Update
{
var $cur = '100';
var $update_dir = './updates/';
var $update_files = array();
var $conf = array();