Home  >  Article  >  Backend Development  >  php Parse error: syntax error, unexpected T_STRING,该怎么处理

php Parse error: syntax error, unexpected T_STRING,该怎么处理

WBOY
WBOYOriginal
2016-06-13 13:38:531121browse

php Parse error: syntax error, unexpected T_STRING
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in D:\inetpub\vhosts\jszy.hebut.edu.cn\httpdocs\admin\common\mysql.class.php on line 11
 
 
 
第十一行代码是:
 
private $host;
 
 
 
怎么会报这样的错,是php的版本不对吗?


------解决方案--------------------
private 只在 php5 以后才有
不会你的是 php4 吧?
如果是php5 请贴出前11行代码
------解决方案--------------------
确切的说const在5.3后才有

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn