错误解析错误:语法错误,意外的T_STRING,预期的T_CONSTANT_ENCAPSED_STRING [英] Error Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING

查看:300
本文介绍了错误解析错误:语法错误,意外的T_STRING,预期的T_CONSTANT_ENCAPSED_STRING的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到此错误:

解析错误:语法错误,意外的T_STRING,在第14行的[wordpress目录]/wp-content/themes/[my-theme]/functions.php中预期为T_CONSTANT_ENCAPSED_STRING或'('

"Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in [wordpress dir]/wp-content/themes/[my-theme]/functions.php on line 14"

第14行只是一个简单的use命令...

And line 14 is just a simple use command...

第13-15行:

add_action('headway_setup_child_theme', array('HeadwaySchematic', 'init'), 1);
use mfbcaptheme\mobilebrowsertheme;
require_once 'mobilebrowsertheme.php';

这是在客户的站点上,并且在我的测试站点上也可以正常工作....不确定是什么原因会导致此错误.

This is on a client's site and it works just fine on my test site....Not sure what would cause this error.

推荐答案

确保它们运行的​​是PHP 5.3或更高版本.如果他们运行的是早期版本,则将不支持名称空间.

Make sure they are running PHP 5.3 or later. If they are running an earlier version they won't have support for namespaces.

这篇关于错误解析错误:语法错误,意外的T_STRING,预期的T_CONSTANT_ENCAPSED_STRING的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆