header("content-type: application/javascript"); // ......... $this->display('./Tpl/default/Index/lib/core/system.js','utf-8','text/javascript');
在模板渲染js,一些配置的信息就直接写在js文件里,做固定的信息加载。
header("content-type: application/javascript"); // ......... $this->display('./Tpl/default/Index/lib/core/system.js','utf-8','text/javascript');