问题描述
我正在努力将我的自定义代码放入其中一个前端控制器 page.PHP
并且在更新后不会丢失它。在 wordpress 中,我们为此使用了子主题,所以我说的是 vBulletin 中的等效主题。我在 index
page.PHP
方法中放置的代码
/*CUSTOM SCRIPT*/
ob_start();
include($_SERVER['DOCUMENT_ROOT'].'/core/packages/tag_categories/widget.PHP');
$cat_list = ob_get_contents();
ob_end_clean();
//advertise module
ob_start();
include($_SERVER['DOCUMENT_ROOT']."/core/packages/advertise/widget.PHP");
$advertise = ob_get_contents();
ob_end_clean();
$advertise = explode("&&&&&",$advertise);
$templater->registerGlobal('categories',$cat_list);
$templater->registerGlobal('advertise',$advertise[0]);
$templater->registerGlobal('more_advertise',$advertise[1]);
$templater->registerGlobal('more',$advertise[2]);
$templater->registerGlobal('learn_more',$advertise[3]);
/*CUSTOM SCRIPT*/
更新版本后,代码丢失。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)