直接上代码:
$url = $this->getConfig ()->url (); $content = "var url={ base:'{$url->base}',css:'{$url->css}',js:'{$url->js}',img:'{$url->img}',current:window.location};"; $expire = 604800; header ( 'Content-type: application/x-javascript' ); header ( 'Cache-Control: max-age=' . $expire ); header ( 'Accept-Ranges: bytes' ); header ( 'Content-Length: ' . strlen ( $content ) ); echo $content;
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com
暂无“PHP动态输出JavaScript代码实例”评论...