使用php exec()调用批处理文件时,批处理文件重定向到一个空文件

时间:2019-06-07 00:41:02

标签: php batch-file

我有一个Windows批处理文件gcloud_batch.bat

gcloud auth application-default print-access-token > token.txt

和php文件:

exec("gcloud_batch.bat", $output, $return);

当我从浏览器运行php文件时,它会创建token.txt,但为空。但是当我从命令行运行批处理文件时,效果很好。

我想念什么?

0 个答案:

没有答案
相关问题