Protocol and encapsulation protocol for PHP support

Source: Internet
Author: User
Tags readfile

1<?PHP2 3 /*4 * Php://stdin standard input stream5 * Php://stdout standard input stream6 * Php://stderr standard error stream7 * Php://output only written data stream8 * php://fd allow direct azimuth file descriptor9  *Ten * Php://memory allows both read and write temporary data php://memory and php://temp are temporary data that are allowed to read and write, the only difference between them is that php://memory always keeps the data in memory One * While Php://temp will present the data in a temporary file after the memory reaches a predefined limit, sys_get_temp_dir () can get the address of the temporary file A * The memory limit of php://temp can be limited by PHP://MAXMEMORY:XX, the unit of XX is byte. - * Php://temp allows to read and write temporary data -  * the * Php://filter Data filter stream, a meta-wrapper for filtering filtering applications when data is opened -  * */ - /* - * Test read/write temporary data stream, Php://temp +  * - $fiveMBs = 5 * 1024x768 *; + $fp = fopen ("Php://temp/maxmemory: $fiveMBs", ' r+ '); A  at fputs ($fp, "hello\n"); -  - //Read What we have written. - Rewind ($FP); - Echo stream_get_contents ($fp); -  */ in  - //Test write-only data flow to$ out= fopen ("Php://output","a"); +Fputs ($ out,"tests can only output streams");

Available options:

Php://filter's Trial method:

 1  /*   */ 2  ReadFile ( php://filter/read= string.toupper/resource=http://www.example.com   "  3  /*   */ 5  ReadFile ( " php://filter/read=string.toupper|string.rot13/resource=http:// www.example.com  ); 
1 /* This will filter out the characters "Hello World" through the ROT13 filter. 2 */3      " Php://filter/write=string.rot13/resource=example.txt " " Hello World " );

The encapsulation protocol supported by PHP is generally understood as such.

  

Protocol and encapsulation protocol for PHP support

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.