laravel 5.1或if语句不起作用

时间:2015-12-07 15:49:34

标签: php if-statement laravel-5.1

好,

简单的IF语句,简单的代码,由于某种原因无法找到解决方案

if (substr(Auth::User()->email, -14) != "@thomasmore.be" || substr(Auth::User()->email, -22) != "@student.thomasmore.be")
    {
        echo substr(Auth::User()->email, -14);
    }

回声:

  

@ thomasmore.be

当我使用时:

if(substr(Auth::User()->email, -14) != "@thomasmore.be") 

效果很好。

我做错了什么?

0 个答案:

没有答案