解析错误:语法错误,意外的T
即时通讯相当新的这个PHP编码,真的想看看是否有可能得到帮助在这里..
以下是编码的一部分,因为显然错误仅在第6行
<?php
class DBWrapper
{
function DBWrapper($server,$db,$user,$pass)
{
$this->Server = $server;
$this->DB = $db;
$this->User = $user;
$this->Password = $pass;
mysql_connect($this->Server, $this->User, $this->password) or
die("Can't connect, please check your settings. Here is the MySQL error: ".mysql_error());
mysql_select_db($this->DB) or
die("Can't select DB, please check your settings. Here is the MySQL error: ".mysql_error());
}
真的希望在这方面有所帮助
这个:
$this->Server = $mysql3.000webhost.com;
你在这个“字符串”上没有引号,所以它被解析为:
$this->Sever = somevariable concatenate with undefined/illegal constant concatenate with undefined constant
也许
$this->Server = '$mysql3.000webhost.com';
或者其他的东西?
$this->Server = $#####;
$this->DB = $#####;
$this->User = $######;
$this->Password = $#######;
嗯,不是那些字符串? 如果是这样,跳过$
并把它们放入'
。
$this->Server = 'mysql3.000webhost.com';
$this->DB = 'a3206525_ezmail';
$this->User = 'a3206525_ezmail';
$this->Password = 'belfegor666';
此外,发布您的凭证并不明智;)
最重要的建议是,阅读更多关于PHP的内容。 它会真的帮助你。
链接地址: http://www.djcxy.com/p/11933.html