note 124760 added to features.file-upload
| From: | Nicolus@php.net | Date: | Tue, 25 Feb 2020 18:02:38 +0000 |
| Subject: | note 124760 added to features.file-upload | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-214226@lists.php.net to get a copy of this message | ||
The given below code is the most simplest way to upload file in php.
<?php
$target_path = "YOUR_PATH";
$target_path = $target_path.basename( $_FILES['uploaded_file']['name']);
if(move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $target_path)) {
echo "File uploaded successfully.";
} else{
echo "Error!, file can not be uploaded.";
}
?>
Source: https://errorsea.com/how-to-upload-file-in-php/
----
Server IP: 45.112.84.4
Probable Submitter: 185.85.3.195 (proxied: 219.91.191.183)
----
Manual Page -- http://php.net/manual/en/features.file-upload.php
Edit -- https://master.php.net/note/edit/124760
Del: integrated -- https://master.php.net/note/delete/124760/integrated
Del: useless -- https://master.php.net/note/delete/124760/useless
Del: bad code -- https://master.php.net/note/delete/124760/bad+code
Del: spam -- https://master.php.net/note/delete/124760/spam
Del: non-english -- https://master.php.net/note/delete/124760/non-english
Del: in docs -- https://master.php.net/note/delete/124760/in+docs
Del: other reasons-- https://master.php.net/note/delete/124760
Reject -- https://master.php.net/note/reject/124760
Search -- https://master.php.net/manage/user-notes.php