0

我遇到了这个致命错误,不知道为什么会生成它。任何帮助将不胜感激。该网站正在在线运行,但是一旦我将其下载到我的系统上,它就会显示此错误。

错误消息是:

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';

PS 数据库名称是正确的,我已经检查过了。

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”。

4

1 回答 1

0

我已经解决了这个问题,分两步。

我从服务器重新下载了所有文件,这解决了问题。我仍然不知道缺少什么。

其次,我在我的系统上配置新的 joomla 应用程序,然后比较两个配置文件(来自服务器站点和一个在 localhost 上配置的文件),并更改除与数据库相关的变量之外的变量。

于 2015-01-09T14:06:09.587 回答