意外的 T_STRING,期待 T_OLD_FUNCTION 或 T_FUNCTION 或 T_VAR [英] Unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR
本文介绍了意外的 T_STRING,期待 T_OLD_FUNCTION 或 T_FUNCTION 或 T_VAR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试运行 WordPress 插件,但出现以下错误:
I'm trying to run a WordPress plugin, and I get the following error:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION
or T_FUNCTION or T_VAR or '}' in
/nfs/c03/h05/mnt/52704/domains/creathive.net/html/wp-content/plugins/qr-code-tag/lib/qrct/QrctWp.php
on line 13
什么会导致这个错误?第 13 行是公共位.
What would cause this error? Line 13 is the public bit.
这是一些代码:
class QrctWp
{
public $pluginName = 'QR Code Tag';
推荐答案
有机会在 PHP4 上运行吗?这就是此位置的错误消息通常所指示的内容.
Running on PHP4 by any chance? That's what the error message at this location would usually indicate.
删除所有 public
和 private
属性.尽管该插件不太可能与旧的对象实例处理完美配合.
Remove all public
and private
attributes. Though it's unlikely the plugin will work perfectly with the older object instance handling.
这篇关于意外的 T_STRING,期待 T_OLD_FUNCTION 或 T_FUNCTION 或 T_VAR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文