September 2001
Intermediate to advanced
768 pages
32h 45m
English
string exec(string cmd, [variable array_name], [variable $return_value])
| cmd | Command to be executed |
| array_name | Array to store the command output |
| return_value | Variable to store the return status of the command |
Executes command cmd in the system’s command interpreter and returns the last line of output. Optional arguments allow the command output and return value to be captured.
Returns:
Last line of output from command cmd
Description:
exec() attempts to execute cmd in the system’s command interpreter. PHP waits until the command interpreter returns before execution of the script continues past the call to exec(). If you’re using a UNIX-like operating system, you can redirect stdout to a file or /dev/null to avoid this.
If the array_name ...
Read now
Unlock full access