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