Last active
December 20, 2015 05:59
-
-
Save codesynapse/6082642 to your computer and use it in GitHub Desktop.
Revisions
-
codesynapse revised this gist
Jul 25, 2013 . 1 changed file with 14 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>File Upload Example</title> </head> <body> <form method="post" action="upload.php" enctype="multipart/form-data"> <label> Upload your file</label><br/> <input type="file" name="file" id="file"><br/> <input type="submit" name="submit"> </form> </body> </html> -
codesynapse created this gist
Jul 25, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>File Upload Status</title> </head> <body> <?php //by using $_files array you can store data from client computer to the remote server //check if the file is uploaded, if not then pass the error if($_FILES['file']['error']>0) { echo 'Error :'.$_FILES['file']['error']."<br/>"; } //if the file is uploaded successfully, echo the file size, type and location echo "Upload ". $_FILES['file']['name']."<br/>"; echo "Type ". $_FILES['file']['type']."<br/>"; echo "Size ".($_FILES['file']['size']/1024) ."<br/>"; echo "Stored in :".$_FILES['file']['tmp_name']."<br/>"; ?> </body> </html>