<html><head><metacharset="UTF8"><title>Upload
title
>
Head
><body><formAction="upload_file.php"method="POST" Enctype="Multipart/form-data"><labelfor ="file">Filename:
Label
><inputtype="File"name="file"id= "File" /><br /><inputtype="Submit"name= "submit"value="Submit" " /><br />
Form
>
Body
>
HTML
>
if(($_files[' file '][' type '] =="Image/gif")|| ($_files[' file '][' type '] =="Image/jpeg")|| ($_files[' file '][' type '] =="Image/pjpeg") && ($_files[' file '][' Size '] <20000)) {if($_files["File"]["Error"] >0) {Echo"Error:".$_files["File"]["Error"] ."
"; }Else{Echo"";Echo"";Echo"
";Echo"Upload:".$_files["File"]["Name"] ."
";Echo"Type:".$_files["File"]["Type"] ."
";Echo"Size:". ($_files["File"]["Size"] /1024x768) .the Kb
";Echo"Stored in:".$_files["File"]["Tmp_name"];Echo"";Echo"";if(File_exists ("upload/".$_files[' file '][' name '])) {Echo$_files[' file '][' name ']."already exists."; }Else{Move_uploaded_file ($_files["File"]["Tmp_name"],"/usr/local/nginx/html/upload/".$_files["File"]["Name"]);Echo"Stored in:"."/usr/local/nginx/html/upload/".$_files["File"]["Name"]; } } }Else{Echo"Invaild file"; }?>
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above describes the PHP upload file code, including uploading files, PHP content, I hope that the PHP tutorial interested in a friend helpful.