本文整理汇总了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();