开发者

Activated a new WP theme, getting this error: Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}'

I am seeing this error in a file called functions.php:

Parse error: syntax error, unexpected T_STR开发者_Go百科ING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}'

I just installed a new theme in wordpress, I don't know much php.

Is this something I can fix easily?


It means the syntax of the file is invalid for the version of PHP you're running it on. It probably means your version of PHP is outdated, i.e. the theme requires PHP5 and you're running on PHP4.

That, or it's a poorly developed theme that has syntax errors.


As ** Deceze** said this issue comes when your website is running on lower version of PHP. To avoid it you can upgrade to Php5.3+ and It will start working. Also yu may get this error Error Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING. These errors comes because the support for namespaces is not their in php versions < 5.3.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜