doukuang1950 2019-03-01 13:28
浏览 119

PHP Parse错误:第26行/public_html/wp-config.php中的语法错误,意外的'DB_USER'(T_STRING),期待','或')'重复]

This question already has an answer here:

PHP Parse error: syntax error, unexpected 'DB_USER' (T_STRING), expecting ',' or ')' in /public_html/wp-config.php on line 26

I've been given this error and don't know how to fix it? Could anyone advise? Thanks. I've been working on this for a while as I'm new to code and would really appreciate some help.

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'newsite’);

/** MySQL database username */
define('DB_USER', ‘user’);

/** MySQL database password */
define('DB_PASSWORD', ‘password’);

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8mb4');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
</div>
  • 写回答

1条回答 默认 最新

  • doudou8081 2019-03-01 13:35
    关注

    you are using two different types of single quotes. the ones around localhost (') are fine, the ones around user (‘) are not. It should work as follows:

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'newsite');
    
    /** MySQL database username */
    define('DB_USER', 'user');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'password');
    
    /** MySQL hostname */
    define('DB_HOST', 'localhost');
    
    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8mb4');
    
    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', '');
    
    评论

报告相同问题?

悬赏问题

  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
  • ¥50 我撰写的python爬虫爬不了 要爬的网址有反爬机制
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥120 计算机网络的新校区组网设计
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录