我是joomla的新手。当我把我的模板改成其他喜欢 http:/www.joomla24.comJoomla_3x_TemplatesJoomla_3x_TemplatesOliverio_Lite.html
我得到以下错误信息
Strict Standards: Non-static method JSite::getMenu() should not be called statically, assuming $this from incompatible context in ..\xampp\htdocs\joomla\templates\oliveriolite\index.php on line 91
Strict Standards: Non-static method JApplication::getMenu() should not be called statically, assuming $this from incompatible context in ..\xampp\htdocs\joomla\includes\application.php on line 569
这很简单。你的模板调用了一个名为 getMenu()
静态地。意思是这个调用看起来像这样。$app::getMenu()
. 但它应该是这样的。$app->getMenu()
. 变量名($app
)不重要,冒号与箭头很重要。
正确的方法是:菜单。
$app = JFactory::getApplication();
$menu = $app->getMenu();
或者更短。
$menu = JFactory::getApplication()->getMenu();
同时配置php.ini中的error_reporting功能
error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED