Name

exec

Synopsis

string exec(string command[, array output[, int return]])

Executes command via the shell and returns the last line of output from the command’s result. If output is specified, it is filled with the lines returned by the command. If return is specified, it is set to the return status of the command.

If you want to have the results of the command output into the PHP page, use passthru().

Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.