system

string system(string cmd, [variable return_value) 

Executes command cmd in the system’s command interpreter and returns the last line of output. An optional argument allows the return value to be captured.

Returns:

Last line of output from command cmd ; FALSE if the command cannot be run

Description:

system() 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 system().

Output from the command is sent directly to stdout.

If the return_value argument is set, the return value of the command is stored in this variable.

Version:

PHP 3+, PHP 4+

Examples:

Use passthru() to display recent errors from the Apache error log for a ...

Get PHP Functions Essential Reference 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.