Add path to PHP that all PHP scripts can access

I am trying to execute a command in php script. I got a command sh not found. I added the path in etc/sysconfig/httpd and it works for my php scripts in apache. How do I make it such that commands are available for scripts outside apache? I need to execute a php daemomn.


I believe you can run it in this format:

/path-to-your-php-install /path-to-your-script.php

example: /usr/bin/php /home/whatever/public_html/script.php

and I think you can determine where your php installation is by using which php command

链接地址: http://www.djcxy.com/p/56796.html

上一篇: 在php脚本之后获取路径

下一篇: 添加所有PHP脚本都可以访问的PHP路径