|
Posted by francescomoi on 02/14/06 18:47
Hi.
On PHP4, I want to execute these two system commands:
# cd /home/foo1/foo2
# /usr/local/php/bin/php /home/foo1/foo2/script.php
If I do it via shell, it works ok.
But If I do:
-------
system("cd /home/foo1/foo2/", $retval);
system("/usr/local/php/bin/php /home/foo1/foo2/script.php", $retval);
--------
I get this error message:
-----
Fatal error: main(): Failed opening required '../config/config.php'
(include_path='.:/usr/local/php/lib/php') in /home/foo1/foo2/script.php
on line 2
-----
This error is caused by the fact that the script is not executed in the
right directory.
Any similar experience?
Navigation:
[Reply to this message]
|