开发者

unexpected T_STRING [closed]

This q开发者_如何学Cuestion is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 11 years ago.

I uploaded a php file to my server and I got this error:

Parse error: syntax error, unexpected T_STRING in /www/zzl.org/m/a/d/madebytheo/htdocs/cms/index.php on line 3

Here is line three:

mysql_connect (localhost, password, username) or die (mysql_error());

Any idea what's wrong?

EDIT It turned out to be the lack of quotes.


Ussually that kind of error is because some trivial typo. In this case, if the above code is your actual code, then you should use double quote to wrap localhost, password and username.


Dollar signs(?) are missing.

mysql_connect($localhost, $password, $username) or die(mysql_error());
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜