我在joomla 1.5中有代码
global $mainframe;
$html = "web solution";
$mainframe->set('JComponentTitle', $html);在Joomla1.5中使用是可以的,但当使用Joomla1.7是错误的Call to a member function set() on a non-object in ...时,我需要这个想法的帮助
发布于 2011-09-27 02:28:43
试试这个:
global $app;
$html = "web solution";
$app->set('JComponentTitle', $html);发布于 2012-02-01 23:04:57
我认为在joomla 1.6+中使用全局对象已经被弃用了。我不使用$mainframe和全局$app,而是使用如下内容:
$app = & JFactory::getApplication();
$html = 'web solution';
$app->set('JComponentTitle', $html);https://stackoverflow.com/questions/7553489
复制相似问题