# Upload. phptableformENCTYPEmultipartform-dataactionupsave.phpmethodposttrtd if it is *. ZIP files will be automatically decompressed brINPUTNAMEMyFileTYPEFilesize50tdtrtrtdcolspan2aligncenterinputtypeSubmitvalue upload classiwhite # upload. php
If the file is *. ZIP, it will be automatically decompressed.
|
|
// Upsave. php
// Save the uploaded file
$ Filename = "$ MyFile_name ";
Copy ($ MyFile, "$ filename ");
Unlink ($ MyFile );
// Determine whether the file is a ZIP file
$ Expand_name = explode (".", $ filename );
If ($ expand_name [1] = "zip" or $ expand_name [1] = "ZIP ")
{
$ Str = "pkunzip.exe-e $ filename ";
Exec ($ str );
Unlink ($ filename );
}
?>
I have tested the above programs. you only need to put them on the server, but the directory must have the write permission. A pkunzip.exe file must also be stored in this directory, which is already in the compressed package.