PHP 404 页面处理代码详解 - 如何优雅地显示错误信息并跳转首页
// 如果是非正常URL,则显示404并退出\n if ($s === '') {\n rt_log_error('bad guy short_url: '.$short_url);\n //header('location: user_push.php');\n echo '404'; // 输出404\n echo "
"; // 输出换行\n echo "点这里返回首页"; // 输出带有链接的文本,用于返回首页\n //echo '404.';\n exit; // 退出程序\n }
原文地址: https://www.cveoy.top/t/topic/pCIw 著作权归作者所有。请勿转载和采集!