我安装了一个joomla模板,但是每次都出现以下错误:
注意:未定义变量:my inC:xampphtdocsJoomla16templatescartionindex.php on line 36
注意:尝试获取非对象的属性C:xampphtdocsJoomla16templatescartionindex.php on line 36
致命错误:在非对象上调用成员函数GETCFG()C:XAMPPHTDOCSJOOMLA16TEMPLATESCARTIONSUCKERFISH.PHP ON LINE 763
我该如何解决这个问题?
我也在分享代码:
<jdoc:include type="head" />
<?php if($my->id) initEditor(); ?> #lin36
if ($mainframe->getCfg('shownoauth')) {
$sql = ("SELECT m.*, count(p.parent) as cnt" .
"nFROM #__menu AS m" .#763
//global $mainframe was deprecated in Joomla 1.5 and completely removed from Joomla 1.6.
//global $mainframe;
$app =& JFactory::getApplication('site');
$app->initialise();
//$access = !$mainframe->getCfg( 'shownoauth' );
$access = $app->getCfg( 'shownoauth' );
我怀疑这是因为$mainframe
没有定义,
$mainframe = new some_classname();
?
看起来也像这个模板缺少必要的类,定义$mainframe