/**
* url 跳转
* @param $url 跳转的url
* @param $type 跳转类型 301 404
* @param $tip 提示信息
*/
function redirect($url = '/', $type = '', $tip = '') {
if ($type == '301') {
Header('HTTP/1.1 301 Moved Permanently');
} elseif ($type == '404') {
Header('HTTP/1.1 404 Not Found');
echo file_get_contents($url);
} else {
if ($tip) {
Header('Content-type:text/html;charset=utf-8');
echo '<script>alert("' . addslashes($tip) . '");location.href="' . $url . '";</script>';
} else {
echo '<script>location.href="' . $url . '";</script>';
}
}
exit();
}
如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!
txttool.com 说一段 esp56物联 查询128 IP查询