當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Update::page_header方法代碼示例

本文整理匯總了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();
開發者ID:jlleblanc,項目名稱:ConnectBoom,代碼行數:31,代碼來源:update.php


注:本文中的Update::page_header方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。