Sunday 15 June 2014

php exec in which directory I am? -


How it detects that you are currently present when executing it:

Exec (" - To know where I am, I have to go to run my script?

You can either use the command or PHP's built-in function to get the work directory . The latter is recommended.

However, if you know the full path of your PHP script, then you should specify it and you do not care what directory you currently want to be included in.

> exec ("php /path/to/somescript.php");

No comments:

Post a Comment