標簽:
1、開啟后臺在線編輯模板功能
找到caches\configs\system.php文件,找到‘tpl_edit‘=> 0,
系統默認是0,開啟在線編輯模板功能只需把0改成1
2、phpcms禁止含有{php標簽的編輯,修改兩個文件
一個文件是phpcms/modules/template/file.php
將$code = str_replace(array(‘<?‘,‘{php‘),array(‘<?‘,‘{ php‘),$code); //注釋掉
另一個文件是phpcms\modules\template\templates\file_edit_file.tpl.php
把 function check_form() {
//if(findInPage("{php")) {
// alert("在線模板編輯禁止提交含有{php 的標簽。");
// return false;
// } else if(findInPage("<\?php")) {
// alert(‘在線模板編輯禁止提交含有<\?php 的標簽。‘);
// return false;
// } else {
// myform.submit();
// }
}
的內容注釋掉,這樣子就可以在線編輯模板了,為了安全性,并不建議這么做。