我正在尝试在我的localhost上设置我的第一个WP Db,但是当我在浏览器上运行它时,我收到此错误:
解析错误:语法错误,第22行C:\ xampp \ htdocs \ wordpress \ wp-config.php中的意外T_CONSTANT_ENCAPSED_STRING
我已经检查了设置,并没有改变我没想到的任何内容,但我仍然收到此错误。
我在以下php中遗漏了什么?
`**// ** MySQL settings - You can get this info from your web host ** //'
`/** The name of the database for WordPress */`
define('DB_NAME', wordpress_test');
/** MySQL database username */
define('DB_USER', 'root');
/** MySQL database password */
define('DB_PASSWORD', '');
/** MySQL hostname */
define('DB_HOST', 'localhost');
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8_unicode_ci');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');**
答案 0 :(得分:3)
更改
define('DB_NAME', wordpress_test');
到
define('DB_NAME', 'wordpress_test');
答案 1 :(得分:1)
`**// ** MySQL settings - You can get this info from your web host ** //' <-- there we see a lost quote...
//It should be ` I think...
`/** The name of the database for WordPress */`
define('DB_NAME', wordpress_test');
/** MySQL database username */
define('DB_USER', 'root');
/** MySQL database password */
define('DB_PASSWORD', '');
/** MySQL hostname */
define('DB_HOST', 'localhost');
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8_unicode_ci');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');**