0
我在我的impress頁面上收到此錯誤代碼。致命錯誤:調用非對象上的成員函數(impresspages)
Fatal error: Call to a member function log() on a non-object in /home/public_html/site/index.php on line 52
我havnt在網站上更改了6個月。突然在幾天前它開始了並且從那以後繼續。
這是我的index.php:
<?php
/**
*
* ImpressPages CMS main frontend file
*
* This file initiates required variables and outputs the content.
*
* @package ImpressPages
*
*
*/
/** Make sure files are accessed through index. */
if (!defined('CMS')) {
define('CMS', true); // make sure other files are accessed through this file.
}
if (!defined('FRONTEND')) {
define('FRONTEND', true); // make sure other files are accessed through this file.
}
if((PHP_MAJOR_VERSION < 5) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 3)) {
echo 'Your PHP version is: '.PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION.'. To run ImpressPages CMS you need PHP 5.3.*';
exit;
}
if(is_file(__DIR__.'/ip_config.php')) {
require (__DIR__.'/ip_config.php');
} else {
require (__DIR__.'/../ip_config.php');
}
if (DEVELOPMENT_ENVIRONMENT){
error_reporting(E_ALL|E_STRICT);
ini_set('display_errors', '1');
} else {
ini_set('display_errors', '0');
}
try {
require_once(BASE_DIR.FRONTEND_DIR.'init.php');
require_once(BASE_DIR.FRONTEND_DIR.'bootstrap.php');
} catch (\Exception $e) {
$log->log('System', 'Exception caught', $e->getMessage().' in '.$e->getFile().':'.$e->getLine());
throw $e;
}
這些線52/53:
$log->log('System', 'Exception caught', $e->getMessage().' in '.$e->getFile().':'.$e->getLine());
throw $e;
有人可以請解釋爲什麼這是發生什麼我可以做什麼?
那麼'$ log'是什麼?它在哪裏定義? 'var_dump()'+'error_reporting(E_ALL)' – zerkms 2014-10-01 21:43:16
不知道。我的編程技巧和理解極其有限。我在尋找什麼? – user3760157 2014-10-02 11:32:44
值得問您的主機提供商是否沒有改變任何東西。將ImpressPages更新到最新的3.x分支也很好(http://sourceforge.net/projects/impresspages/files/?source=navbar)。 – 2014-10-02 16:29:25