我在/var/www/wordpress/wp-config.php中发现此错误,
但是我找不到错误
<?php
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress_db);
/** MySQL database username */
define('DB_USER', 'username_here');
/** MySQL database password */
define('DB_PASSWORD', 'wp_password');
/** MySQL hostname */
define('DB_HOST', '99.99.99.99');
/** 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', '');
define('AUTH_KEY', 'put your unique phrase here');
define('SECURE_AUTH_KEY', 'put your unique phrase here');
define('LOGGED_IN_KEY', 'put your unique phrase here');
define('NONCE_KEY', 'put your unique phrase here');
define('AUTH_SALT', 'put your unique phrase here');
define('SECURE_AUTH_SALT', 'put your unique phrase here');
define('LOGGED_IN_SALT', 'put your unique phrase here');
define('NONCE_SALT', 'put your unique phrase here');
从我的角度来看,一切似乎都是正确的,我所缺少的是什么?
维克多
答案 0 :(得分:-1)
这是语法错误。您错过了$employees = Employee::with(['user' => function ($query) {
$query->select(['id', 'employee_id', 'name']);
}])
->where('department', $request->department)
->select(['id', 'emp_id', 'salary'])
->get();
后三行中的结束语。
更改
wordpress_db
到
define('DB_NAME', 'wordpress_db);
它将解决您的问题。