dqaq59269 2009-12-13 19:33
浏览 14

语法错误,意外'。',在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
  • 写回答

3条回答 默认 最新

  • douzi2333 2009-12-13 19:41
    关注

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

    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题