Heim >Backend-Entwicklung >PHP-Tutorial >php合并js请求的例子_PHP教程
看代码就会的小例子:php合并js请求
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";
}
}
}
?>