Process Control Extender executor execution function

Source: Internet
Author: User

<?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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.