Home >Backend Development >PHP Tutorial >Example of php merging js requests_PHP tutorial
A small example that you can learn by looking at the code: php merge js request
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";
}
}
}
?>