base}',cs">
时间:2021-07-01 10:21:17 帮助过:3人阅读
直接上代码:
$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;
http://www.bkjia.com/PHPjc/957125.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/957125.htmlTechArticlePHP动态输出JavaScript代码实例,phpjavascript 直接上代码: $url = $this-getConfig ()-url ();$content = "var url={ base:'{$url-base}',css:'{$url-css}',js:'{$url-js}',i...