Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/273.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
wp-config.php文件上出现Wordpress错误;语法错误,意外';WP#u调试';(T_STRING)";_Php_Wordpress - Fatal编程技术网

wp-config.php文件上出现Wordpress错误;语法错误,意外';WP#u调试';(T_STRING)";

wp-config.php文件上出现Wordpress错误;语法错误,意外';WP#u调试';(T_STRING)";,php,wordpress,Php,Wordpress,我已经建立了很多wordpress网站,从来没有看到过这个错误,我只是完成了网站并将其移动到最终托管,我遇到了这个错误: 分析错误:语法错误,第74行出现意外的“WP_DEBUG”(T_字符串) 内容是: <?php /** * The base configuration for WordPress * * The wp-config.php creation script uses this file during the * installation. You don't h

我已经建立了很多wordpress网站,从来没有看到过这个错误,我只是完成了网站并将其移动到最终托管,我遇到了这个错误:

分析错误:语法错误,第74行出现意外的“WP_DEBUG”(T_字符串)

内容是:

<?php
/**
 * The base configuration for WordPress
 *
 * The wp-config.php creation script uses this file during the
 * installation. You don't have to use the web site, you can
 * copy this file to "wp-config.php" and fill in the values.
 *
 * This file contains the following configurations:
 *
 * * MySQL settings
 * * Secret keys
 * * Database table prefix
 * * ABSPATH
 *
 * @link https://codex.wordpress.org/Editing_wp-config.php
 *
 * @package WordPress
 */

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

/** MySQL database username */
define( 'DB_USER', 'XXXXXXXXXX' );

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

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

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

/** The Database Collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );

/**#@+
 * Authentication Unique Keys and Salts.
 *
 * Change these to different unique phrases!
 * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
 * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
 *
 * @since 2.6.0
 */
define( 'AUTH_KEY',         'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' );
define( 'SECURE_AUTH_KEY',  'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' );
define( 'LOGGED_IN_KEY',    'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' );
define( 'NONCE_KEY',        'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' );
define( 'AUTH_SALT',        'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' );
define( 'SECURE_AUTH_SALT', 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' );
define( 'LOGGED_IN_SALT',   'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' );
define( 'NONCE_SALT',       'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' );

/**#@-*/
/**
 * WordPress Database Table prefix.
 *
 * You can have multiple installations in one database if you give each
 * a unique prefix. Only numbers, letters, and underscores please!
 */
$table_prefix = 'xxxxx_’;

/**
 * Para desarrolladores: modo debug de WordPress.
 *
 * Cambia esto a true para activar la muestra de avisos durante el desarrollo.
 * Se recomienda encarecidamente a los desarrolladores de temas y plugins que usen WP_DEBUG
 * en sus entornos de desarrollo.
 */
define('WP_DEBUG', true);

/* ¡Eso es todo, deja de editar! Feliz blogging */

/** WordPress absolute path to the Wordpress directory. */
if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');

如果我创建了一个简单的PHP文件(有语法错误):


请仔细查看定义表前缀的位置。分号彼此不同。在wp-config.php文件中,有时会发生这种情况,并抛出一个错误。查看屏幕截图:

您是否在注释前的一行中添加了分号?非常有趣的链接:>检查上面问题中的代码突出显示,您可以清楚地看到,就在您的
tableprefix
之后,PHP代码的颜色错误。只要使用一个好的,你就可以在编写代码时发现这一点。你的结束引号字符在
$table_prefix='xxxxx_'上是错误的现在你可以看到完整的文档了,你看到有趣的东西了吗?是的
$table_prefix
以卷曲引号而不是单引号结束。但错误出现在第74行的“define('WP_DEBUG',true);”和?修复第65行末尾的错误,您就可以开始了。我想我已经解决了php错误,它是$table_prefix='wp_u',它是“$table_prefix='xxxxxxx'”;而不是“$table_prefix='xxxxxxx”;-现在数据库连接问题在3分钟内解决了。非常感谢!
<?php
$table_prefix = 'wp_

define('WP_DEBUG', false);
PHP Parse error: syntax error, unexpected 'WP_DEBUG' (T_STRING) in simple.php on line 4