语法错误,意外'。',在config.php中期待']'

$dbhost = "10.21.47.198"; 
$dbuser = "xxxxx"; 
$dbpass = "xxxxx"; 
$dbname = "xxxxxx"; 
$prefix = "art_"; // you can change this prefix but not necessary 
$cdomain = $_SERVER['SERVER_NAME']=='xxxxxxxxx' ? '' : ".$_SERVER[xxxxxxxxxxx]"; //.yoursite.com $date_format = "F d, Y"; 
$admin_email = "contact@seoinabook.com";

the above code is part of an article publisher script. It is the next line after the standard database info,

(db=database name, username= username, etc.)

It seems to install okay, but when I try to go to the home page or admin page this kicks in. What does it mean by server name and then server? I thought they were the same unless server name is like the public_html.

this is the error I get:

Parse error: syntax error, unexpected '.', expecting ']' in /home2/seobook/public_html/articlepublish/config.php on line 28

The problem is with the dot in $_SERVER[seoinabook.com]. Try quoting the key, $_SERVER['seoinabook.com'].

I think the right code will be:

## set domain prefix if current domain is not main
$cdomain = $_SERVER['SERVER_NAME']=='seoinabook.com' ? '' : "seoinabook.com";

It looks like to me that the code should look like this...

$cdomain = $_SERVER['SERVER_NAME']=='seoinabook.com' ? '' : $_SERVER['SERVER_NAME'];

it says that $cdomain should equal '' if the $_SERVER['SERVER_NAME'] equals 'seoinabook.com' else it will equal $_SERVER['SERVER_NAME']