Templates 严格的标准不断地得到这个错误
我不断收到这个浏览器错误Templates 严格的标准不断地得到这个错误,templates,Templates,我不断收到这个浏览器错误 Strict Standards: Non-static method JSite::getMenu() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\afvidz\templates\videoplus\index.php on line 53` Strict Standards: Non-static method JAp
Strict Standards: Non-static method JSite::getMenu() should not be called statically,
assuming $this from incompatible context
in C:\xampp\htdocs\afvidz\templates\videoplus\index.php on line 53`
Strict Standards: Non-static method JApplication::getMenu() should not be called statically,
assuming $this from incompatible context
in C:\xampp\htdocs\afvidz\includes\application.php on line 593`
这是我的第53行
$menu = JSite::getMenu();
第593行
$menu = parent::getMenu('site', $options);
Yoiu尝试以静态方式调用对象方法(类方法)
不能像调用静态方法那样调用
getMenu
你应该做:
$object = new JSite; // First you create an object
$menu = $object->getMenu(); // Finally you call getMenu
查看文档以了解什么是静态方法:
此链接对您的情况也非常有用:(查看第二个示例)。
$object = new JSite; // First you create an object
$menu = $object->getMenu(); // Finally you call getMenu