!解析错误:语法错误,意外"公共"(T_PUBLIC)

use*_*052 0 php wordpress

我正在本地转移一个wordpress网站,所以我可以安全地开发,我对这一切都很新,并且遇到了这个错误,所以如果你能用简单的术语解释如何修复那么那将是非常有帮助的:

!Parse error: syntax error, unexpected 'public' (T_PUBLIC) in 
C:\wamp\www\KentVenuesTest\wp-content\mu-plugins\wpengine-common\plugin.php
on line 408

Call Stack

#  Time    Memory   Function
1.0.0007 - 247624 - {Main}()<p>
2.0.0014 - 251160 - require ('C:\wamp\www\KentVenuesTest\wp-blog-header.php')<p>
3.0.0022 - 268032 - require_once('C\wamp\www\KentVenuesTest\wp-load.php')<p>
4 0.0029 - 279728 - require_once('C\wamp\www\KentVenuesTest\wp-config.php')<p>
5 0.0041 - 370928 - require_once('C\wamp\www\KentVenuesTest\wp-settings.php')<p>
6 0.2186 - 13379696 - 4 -0.0029 - 279728 - include_once('C\wamp\www\KentVenuesTest\mu-plugins\mu-plugin.php<p>

Location

1 ..\index.php:0<p>
2 ..\index.php:17<p>
3 ..\wp-blog-header.php:12<p>
4 ..\wp-load.php:29<p>
5 ..\wp-config.php:90<p>
6 ..\wp-settings.php:159<p>
Run Code Online (Sandbox Code Playgroud)

任何帮助将不胜感激.

hex*_*mal 8

问题可能在于php配置的差异.我曾经遇到过类似的问题,你的情况让我想起了.它是由与短语法相关的php配置引起的,<?php它允许使用<?.关于测试环境的<?生产工作没有

  • 我从wpengine设置本地备份站点时遇到了同样的错误:语法错误,mu-plugins\wpengine-common\plugin.php中的意外"公共"(T_PUBLIC)设置short_open_tag =在php.ini中修复了它.日Thnx (2认同)