我遇到了这个致命的错误,并且不知道它为什么会被生成。任何帮助将非常感激。这个网站正在网上工作,但是一旦我将它下载到我的系统,就会显示此错误。
错误讯息是:
Fatal error: Call to undefined method Exception::get() in C:\wamp\www\motor_racing_server\templates\yoo_shelf\error.php on line 20
更多信息:
我已经更新了configuration.php文件变量。下面是更改的文件列表。
public $dbtype = 'mysql';
public $host = 'localhost';
public $user = 'root';
public $password = '';
public $db = 'motor_racing_joomla';
public $log_path = 'C:\\wamp\\www\\NEW_JOOMLA\\logs';
public $tmp_path = 'C:\\wamp\\www\\NEW_JOOMLA\\tmp';
P.S数据库名称是正确的,我已经检查过了。
error.php代码位于
之下<?php
/**
* @package yoo_shelf
* @author YOOtheme http://www.yootheme.com
* @copyright Copyright (C) YOOtheme GmbH
* @license http://www.gnu.org/licenses/gpl.html GNU/GPL
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
// include config
include_once(dirname(__FILE__).'/config.php');
// get warp
$warp = Warp::getInstance();
// set messages
$title = $this->title; // line 19
$error = $this->error->get('code'); // line 20
$message = $this->error->get('message'); // line 21
// set 404 messages
if ($error == '404') {
$title = JText::_('TPL_WARP_404_PAGE_TITLE');
$message = JText::sprintf('TPL_WARP_404_PAGE_MESSAGE', JURI::root(false), $warp['config']->get('site_name'));
}
// render error layout
echo $warp['template']->render('error', compact('title', 'error', 'message'));
我试图删除第20行,代码为第21行生成相同的错误。在注释掉第20行和第21行后,我收到错误“错误500”。
答案 0 :(得分:0)
我已经分两步修复了这个问题。
我从服务器重新下载所有文件,并解决了这个问题。 我仍然不知道遗失了什么。
其次,我在我的系统上配置新的joomla应用程序,然后比较两个配置文件(来自服务器站点和localhost上配置的一个),并更改除与数据库相关的变量之外的变量。