我的 php 代码出现以下错误。
Parse error: syntax error, unexpected T_BOOLEAN_OR in...
我的代码是...
<?php if( !is_home()) or ( !is_archive()) { ?>
(my code is here)
<?php ?>
错误在第一行。我试过用谷歌搜索这个,但看不到我做错了什么。
你能发现上面的代码有什么问题吗?
提前致谢
我的 php 代码出现以下错误。
Parse error: syntax error, unexpected T_BOOLEAN_OR in...
我的代码是...
<?php if( !is_home()) or ( !is_archive()) { ?>
(my code is here)
<?php ?>
错误在第一行。我试过用谷歌搜索这个,但看不到我做错了什么。
你能发现上面的代码有什么问题吗?
提前致谢
尝试:
<?php if( !is_home() or !is_archive()) { ?>
你应该把or
里面if()
这样:
if(!is_home() or !is_archive() ) {
更多信息在这里: http: //php.net/manual/en/language.operators.logical.php