Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/267.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
为什么我不能用使用节点模块创建的php服务器连接到mysql数据库_Php_Wordpress_Node.js_Gruntjs - Fatal编程技术网

为什么我不能用使用节点模块创建的php服务器连接到mysql数据库

为什么我不能用使用节点模块创建的php服务器连接到mysql数据库,php,wordpress,node.js,gruntjs,Php,Wordpress,Node.js,Gruntjs,我正在用wordpress安装一个新站点 我正在使用本地站点内的节点;使用名为Grunt php的节点包运行php服务器 在我的Grunfile.js中,我有: php: { dist: { options: { hostname: 'localhost', open: true, port: 4000,

我正在用wordpress安装一个新站点

我正在使用本地站点内的节点;使用名为Grunt php的节点包运行php服务器

在我的Grunfile.js中,我有:

php: {
            dist: {
                options: {
                    hostname: 'localhost',
                    open: true,
                    port: 4000,
                    base: '/Freelance/Current Projects/project/WordPress',
                }
            }
        }
这将运行一个php服务器,并在package.json文件中安装以下包:

{
  "name": "Project-1e",
  "version": "1.0.0",
  "dependencies": {},
  "devDependencies": {
    "grunt": "~0.4.4",
    "grunt-autoprefixer": "~0.7.2",
    "grunt-contrib-cssmin": "~0.9.0",
    "grunt-contrib-imagemin": "~0.6.1",
    "grunt-contrib-jshint": "~0.10.0",
    "grunt-contrib-sass": "^0.7.3",
    "grunt-contrib-uglify": "~0.4.0",
    "grunt-contrib-watch": "~0.6.1",
    "grunt-php": "~0.3.3",
    "grunt-rsync": "~0.5.0",
    "load-grunt-tasks": "~0.4.0"
  }
}
当我使用grunt并允许我在localhost:4000上加载站点时,它告诉我在我的wp配置中没有db连接,我得到以下信息:

define('DB_NAME', 'project-1e');

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

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

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

/** 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', '');
有人能告诉我这到底是什么吗