Annaccond
05-15-2007, 11:40 PM
Sorry if my question sounds silly but I have problem with something very easy. This is how looks beginning of index page of some script:
$dbhost = "sql.mysite.com";
$dbuser = "root";
$dbpass = "root";
$dbname = "abc";
$domain = $_SERVER['SERVER_NAME']=='localhost' ? '' : ".$_SERVER[SERVER_NAME]"; //.yoursite.com
I don't know how and where to write server name and host name. It seems to be logic for me write in in SERVER_NAME but I wrote it in many different forms like:
- mysite.com
- .mysite.com
- ./
- www.mysite.com
- http://www.mysite.com
and it doesn't work. I changed also localhost to sql.mysite.com but still nothing. I'm getting Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /test/config.php on line 9 (it's that line with server name).
In which form I should write it?
$dbhost = "sql.mysite.com";
$dbuser = "root";
$dbpass = "root";
$dbname = "abc";
$domain = $_SERVER['SERVER_NAME']=='localhost' ? '' : ".$_SERVER[SERVER_NAME]"; //.yoursite.com
I don't know how and where to write server name and host name. It seems to be logic for me write in in SERVER_NAME but I wrote it in many different forms like:
- mysite.com
- .mysite.com
- ./
- www.mysite.com
- http://www.mysite.com
and it doesn't work. I changed also localhost to sql.mysite.com but still nothing. I'm getting Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /test/config.php on line 9 (it's that line with server name).
In which form I should write it?