如何在标头('Location: '.$_GET['q']);在我的代码中?
<?php
if (isset($_GET['q']) && !empty($_GET['q'])) {
if(filter_var($_GET['q'], FILTER_VALIDATE_URL)){
header('Location: '.$_GET['q']);
}else{
echo "Invalid URL";
}
}
Sleep
函数将阻塞之后要执行的代码。
也许你要找的是html meta tag refresh
:
<META http-equiv="refresh" content="5;URL=http://www.example.com/mypage">