-2

我正在尝试在我的本地主机上设置我的第一个 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', '');**
4

2 回答 2

3

改变

define('DB_NAME', wordpress_test');

define('DB_NAME', 'wordpress_test');
于 2012-06-09T22:02:25.547 回答
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', '');**
于 2012-06-09T18:13:49.850 回答