Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/23.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
grunt php:';php';未识别为内部或外部命令_Php_Server_Gruntjs - Fatal编程技术网

grunt php:';php';未识别为内部或外部命令

grunt php:';php';未识别为内部或外部命令,php,server,gruntjs,Php,Server,Gruntjs,我尝试运行grunt php,但总是收到警告: 警告:命令失败:C:\Windows\system32\cmd.exe/s/C“php --版本“'php'不被识别为内部或外部命令、可操作程序或批处理文件 我已安装xamp并将路径添加到我的环境变量中,我的php.exe位于: name: path value: C:\xampp\php\ 但我还是得到了警告。在我的gruntfile.js中,我只从文档中复制了以下行: php: { dist: { options: {

我尝试运行
grunt php
,但总是收到警告:

警告:命令失败:C:\Windows\system32\cmd.exe/s/C“php
--版本“'php'不被识别为内部或外部命令、可操作程序或批处理文件

我已安装xamp并将路径添加到我的环境变量中,我的php.exe位于:

name: path
value: C:\xampp\php\
但我还是得到了警告。在我的
gruntfile.js
中,我只从文档中复制了以下行:

php: {
    dist: {
        options: {
            keepalive: true,
            open: true,
            port: 5000
        }
    }
},

有没有关于我做错了什么或遗漏了什么的想法?

在哪里添加了XAMPP路径?如果在cmd.exe提示符中键入
echo%PATH%
,是否仍能看到它?重新启动后正常工作。。。不知道XAMPP路径添加到哪里?如果在cmd.exe提示符中键入
echo%PATH%
,是否仍能看到它?重新启动后正常工作。。。我不知道