Parse error: syntax error, unexpected T
im quite new on this php codings and really would like to see if is possible to get help here..
Below is a part of the coding since apparently the error is only on line 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());
}
Really hope for some help in this
This:
$this->Server = $mysql3.000webhost.com;
You have no quotes on this "string", so it's being parsed as:
$this->Sever = somevariable concatenate with undefined/illegal constant concatenate with undefined constant
Perhaps
$this->Server = '$mysql3.000webhost.com';
or something?
$this->Server = $#####;
$this->DB = $#####;
$this->User = $######;
$this->Password = $#######;
Hmm, aren't those strings? If so, skip $
and put them into '
.
$this->Server = 'mysql3.000webhost.com';
$this->DB = 'a3206525_ezmail';
$this->User = 'a3206525_ezmail';
$this->Password = 'belfegor666';
Also, it's not wise to publish your credentials ;)
And the most important advice, read some more about PHP. It'll really help you.
链接地址: http://www.djcxy.com/p/11934.html下一篇: 解析错误:语法错误,意外的T