我收到此错误:
"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
命令...
第 13-15 行:
add_action('headway_setup_child_theme', array('HeadwaySchematic', 'init'), 1);
use mfbcaptheme\mobilebrowsertheme;
require_once 'mobilebrowsertheme.php';
这是在客户的网站上,它在我的测试网站上运行良好....不确定是什么导致了这个错误。
最佳答案
确保他们运行的是 PHP 5.3 或更高版本。如果他们运行的是早期版本,他们将不支持命名空间。
关于php - 错误解析错误 : syntax error, 意外 T_STRING,期望 T_CONSTANT_ENCAPSED_STRING,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13960277/