时间:2021-07-01 10:21:17 帮助过:2人阅读
if($_GET['f'])
{
$url = parse_url($_SERVER['REQUEST_URI']);
$arr_f = array_unique(explode(',',preg_replace("/\.+\//",'',$_GET['f'])));
foreach($arr_f as $v)
{
if(!empty($v))
{
include('./'.$v.'.js');
echo "\n";
}
}
}
?>
http://www.bkjia.com/PHPjc/825023.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/825023.htmlTechArticle看代码就会的小例子:php合并js请求 代码如下://页面保存为js.php //前台请求范例http://localhost/js.php?f=1,2 //请求1.js,2.js两个文件 ?PH...