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

查看:40
本文介绍了错误解析错误:语法错误,意外的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 mfbcapthememobilebrowsertheme;
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天全站免登陆