收藏
回答

命令行v2 windows执行正常,代码访问报错!麻烦看下是哪里出了问题呢?

$command ="C:\www\微信web开发者工具\cli -h";
exec($command.' 2>&1',$output,$status);
var_dump($output);
echo '<br>';
print_r($status);

//执行后的结果
1
array(13) { [0]=> string(12) "node:net:342" [1]=> string(32) " err = this._handle.open(fd);" [2]=> string(24) " ^" [3]=> string(0) "" [4]=> string(45) "Error: EINVAL: invalid argument, uv_pipe_open" [5]=> string(35) " at new Socket (node:net:342:24)" [6]=> string(91) " at process.getStdin [as stdin] (node:internal/bootstrap/switches/is_main_thread:180:17)" [7]=> string(52) " at C:\www\微信web开发者工具\cli.js:1:4840" [8]=> string(75) " at processTicksAndRejections (node:internal/process/task_queues:96:5) {" [9]=> string(15) " errno: -4071," [10]=> string(17) " code: 'EINVAL'," [11]=> string(25) " syscall: 'uv_pipe_open'" [12]=> string(1) "}" }
0

回答关注问题邀请回答
收藏
登录 后发表内容