Search code examples
phpexecphp4

Looking for an easy explanation of exec in PHP


I am having trouble understanding the exec function in PHP. Can someone please explain it to me in simple terms?


Solution

  • exec — 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.

    string exec(cmd[, array_name][, $return_value]); string cmd: Command to be executed