header('location:index.php');
redirectPage('index.php');
//即使转向后不使用exit()程序会继续执行下面的代码。测试时,注意本文件夹可写权限
$f = fopen('a.php','w');
fwrite($f,'hahahha');
fclose($f);
/**
* url redirect
*
* @param string $url
*/
function redirectPage($url){
echo sprintf(" location.assign('%s'); ",$url);
}
?>
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13523843/viewspace-441024/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/13523843/viewspace-441024/