【发布时间】:2015-02-26 20:45:08
【问题描述】:
如果变量不匹配 5 个不同的值,我想使用一些简单的代码来退出脚本。我只能让它与一个一起工作。即使 URL 变量匹配,脚本也会不断回显“未知请求”。
//Make sure the value of the variable matches one of the variables in the URL.
if($category !== ('food' || 'drink' || 'etc.'))
{echo "unknown request.";
exit();
}
谢谢。
【问题讨论】:
标签: php