如果是非正常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;上面的代码是什么意思
这段代码是一个条件判断语句,判断变量 $s 是否为空字符串。如果 $s 为空字符串,则执行以下操作:
- 调用一个名为 rt_log_error 的函数,并传入参数 'bad guy short_url: '.$short_url。这个函数可能被用来记录错误日志。
- 注释掉了一个名为 header 的函数调用,该函数通常用于发送 HTTP 头信息,这里被注释掉了,可能是为了避免重定向到 user_push.php 页面。
- 输出字符串 '404'。
- 输出换行符。
- 输出一个 HTML 链接标签,链接到 index.php 页面,并显示文本 '点这里返回首页'。
- 输出字符串 '404.'。
- 退出当前脚本的执行。
原文地址: https://www.cveoy.top/t/topic/hG5e 著作权归作者所有。请勿转载和采集!