Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/237.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/16.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 exec函数运行GruntJs任务_Php_Windows_Gruntjs_Wamp - Fatal编程技术网

从php exec函数运行GruntJs任务

从php exec函数运行GruntJs任务,php,windows,gruntjs,wamp,Php,Windows,Gruntjs,Wamp,我想通过从php exec函数运行命令来执行一些grunt任务 我已经: 全局安装grunt:npm-g安装grunt cli 设置apache和windows以允许从php运行CLI(我使用 wampserver) 我从php运行了以下脚本: <?php exec('grunt --gruntfile Gruntfile.js');` gruntTask.bat包含: grunt --gruntfile Gruntfile.js 但是为什么它不能执行这个脚本呢?我错过什么了吗 需

我想通过从php exec函数运行命令来执行一些grunt任务

我已经:

  • 全局安装grunt:
    npm-g安装grunt cli
  • 设置apache和windows以允许从php运行CLI(我使用 wampserver)
我从php运行了以下脚本:

<?php
exec('grunt --gruntfile Gruntfile.js');`
gruntTask.bat包含:

grunt --gruntfile Gruntfile.js
但是为什么它不能执行这个脚本呢?我错过什么了吗

需要帮助的人

问候,

grunt --gruntfile Gruntfile.js