I have a php script (lets call this /test.php) on my server. After Grunt automatically has parsed my SCSS and JS I would like to run this test.php script (it resets my memcache). I can't seem to find a way to do this. Anyone got a clue?
1条回答 默认 最新
- dongyue3795 2015-05-20 08:54关注
You can use grunt-shell to run your php script on cli via
php -f your-script.php
grunt.initConfig({ shell: { php: { command: 'php -f your-script.php' } } } grunt.registerTask('runTestPhp', ['shell:php']);
If you don't want to run your php script through cli, have a look at grunt-php.
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报