Fatal error: Cannot use isset() on the result of an expression (you can use “null !== expression” instead)

白昼怎懂夜的黑 提交于 2019-12-13 09:24:49

问题


if(isset($_GET['a'] or $_GET['b'])){
  echo "ok";
}else{
  echo "no";
 }

i have two var for one condition when isset $_GET['a'] or $_GET['b']
always echo ok either echo no


回答1:


isset takes only one input not two

it should be

if(isset($_GET['a']) OR isset($_GET['b']))
{
echo 'ok';
}
else
{
echo 'nope';
}


来源:https://stackoverflow.com/questions/32061024/fatal-error-cannot-use-isset-on-the-result-of-an-expression-you-can-use-nul

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!