如何在* .sh脚本中正确使用php_cli?

时间:2015-11-17 10:13:09

标签: php shell

来自test_script.sh:

php_cli -f somefile.php

给出错误:"无法打开输入文件:somefile.php"

但是

php_cli -f somefile.php some_random_string

运行正常。

直接来自shell:

php_cli -f somefile.php

没有出错。

为什么我必须将test_script.sh中的附加字符串(参数?)传递给php_cli才能正确执行?

是否有可能在不添加随机字符串的情况下执行此PHP脚本?

0 个答案:

没有答案