如果是非正常URL则显示404并退出if $s === rt_log_errorbad guy short_url $short_url; headerlocation user_pushphp; echo 404; echo br; echo a href=indexphp 点这里返回首页a; echo 404; exit;优化上面这段代码上面的代码对index
// 如果是非正常URL,则显示404并退出
if ($s === '') {
rt_log_error('bad guy short_url: '.$short_url);
header('HTTP/1.1 404 Not Found');
echo '404'; echo "
"; echo "点这里返回首页";
exit;
}
原文地址: https://www.cveoy.top/t/topic/hTGc 著作权归作者所有。请勿转载和采集!