Php uploads the rar package and decompress it to the directory 1. principles of php Upload and decompression common Upload function Upload server rarzip load system components run the decompression command to decompress the package to the 7z2 directory. differences between several types of functions that php executes system commands system () outputs and returns the last shell result exe... syntaxHighlighter. all ()
Upload the rar package in php and decompress it to the directory.
1. Principles of php Upload and decompression
Normal Upload function Upload server
Rar
The system component is loaded by zip and decompressed to the directory.
7z
2. differences between several types of functions used to execute system commands in php
System () outputs and returns the last shell result
Exec () does not output results, returns the last line of shell results
Passthru () only calls the command and outputs the running result as is.
The new com () system predefines the com class and selects the built-in method as needed.
3. use php pre-defined com components to load shell
$ Obj = new com ('wscript. shell'); loads wscript. shell to execute the DOS command component.
$ Obj-> run ('command content to be executed ');
Rar decompression command: the decompressed position of winrar x file
4. example of php Upload and decompression operations
Get the current absolute path getcwd ();
Upload the mobile file function move_uploaded_file ();
This article is from the "r0otkit" blog