note 129566 added to features.file-upload.post-method
| From: | Kolusion | Date: | Sat, 08 Jun 2024 06:35:17 +0000 |
| Subject: | note 129566 added to features.file-upload.post-method | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-221366@lists.php.net to get a copy of this message | ||
Here is the missing example for this page- a non-life story, non-over-complicated, to the point
example that just shows you how the damn function works in its simplest.
HTML:
<form action="" enctype="multipart/form-data" method="post">
<input name="somefile" type="file">
<input type="submit" value="Submit">
</form>
PHP:
<?php
move_uploaded_file($_FILES["somefile"]["tmp_name"],
$_FILES["somefile"]["name"])
?>
This will upload the file to the directory where the PHP file runs from, as long as the web server
has write permission to the directory.
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 1.145.212.27)
----
Manual Page -- https://php.net/manual/en/features.file-upload.post-method.php
Edit -- https://main.php.net/note/edit/129566
Del: integrated -- https://main.php.net/note/delete/129566/integrated
Del: useless -- https://main.php.net/note/delete/129566/useless
Del: bad code -- https://main.php.net/note/delete/129566/bad+code
Del: spam -- https://main.php.net/note/delete/129566/spam
Del: non-english -- https://main.php.net/note/delete/129566/non-english
Del: in docs -- https://main.php.net/note/delete/129566/in+docs
Del: other reasons-- https://main.php.net/note/delete/129566
Reject -- https://main.php.net/note/reject/129566
Search -- https://main.php.net/manage/user-notes.php