0) {echo ' File upload failed, please try again! ";} else{/**$_files[' file ' [' Tmp_name '] files are uploaded on the server side of the temporary filename */if (move_uploaded_file ($_files[' file '] [' tmp_name '], $url. $filename) {echo $filesize; echo "file uploaded successfully!) ";} Else{echo "File upload failed, please try again! ";}}} Else{echo "Please select the file you want to upload! ";}} File Delete if (Isset ($_post[' del ')) {//File size $filesize=$_files[' file2 ' [' Size '];//file name $filename=$_files[' file2 '] [' Name '];//file storage path $url= ' data/'; $delfile = $url. $filename;//recode Path $delfile = iconv (' utf-8 ', ' GBK ', $delfile); Search for file if (file_exists ($delfile)) {if (unlink ($delfile)) {echo "delete succeeded";}}} FileName modification if (isset ($_post[' Update ')) {//File size $filesize=$_files[' file3 ' [' Size '];//file name $filename=$_files[' file3 '] [' Name '];//file storage path $url= ' data/'; $delfile = $url. $filename;//recode Path $delfile = iconv (' utf-8 ', ' GBK ', $delfile); Get new file name from Form $newname=$_post[' NewName ']; $newfilename = $url. $newName;//new Code $newfilename=iconv (' Utf-8 ', ' GBK ', $ NewFileName); if (rename ($delfile, $newfileName)) {echo "modified successfully! ";}}? >
The above describes how PHP files open php file operation, including the PHP file how to open aspects of the content, I hope that the PHP tutorial interested friends helpful.