<?PHP//Resource Limits Name default modifiable range update log//memory_limit "128M" Php_ini_all "8M" before PHP 5.2.0, "16M" in PHP 5.2.0//echo Memory_get_peak_usage ();//Returns the peak//echo "<br>" Assigned to PHP memory;//echo memory_get_usage ();//Returns the amount of memory allocated to PHP/** Process Control extension System Program execution class function * escapeshellarg-the string to a parameter that can be used in a shell command Escapeshellcmd-shell the character escape exec-execute an external program passthru- Executes an external program and displays the original output proc_close-closes the process opened by Proc_open and returns the process exit code proc_get_status-get information about the process opened by the Proc_open function proc_nice-Modify the priority of the current process P roc_open-executes a command and opens a file pointer for input/output. Proc_terminate-kills a process that is opened by Proc_open shell_exec-executes the command through the shell environment and returns the full output as a string. system-Execute external program, and display output * * **///$dir = "/usr/local/nginx/html/";//system (' ls '. Escapeshellarg ($dir));//Note whether these commands are executed under Windows or Linux, Now this test executes under Linux, directly back to the return value//when the user-supplied data is passed into this function, using Escapeshellarg () or escapeshellcmd () to ensure that the user deceives the system and executes arbitrary commands. echo exec (' netstat ');////system (' netstat-tnlp ');//echo passthru (' netstat ');//executes an external program and displays the original output. View the source code to see the//$ Output = shell_exec (' ls ');//execution Shell is very useful, but only use your PHP user, user group Permissions command//echo "<pre> $output </pre>";
Process Control Extender executor execution function