Home > Backend Development > PHP Tutorial > PHP file upload main code explanation_PHP tutorial

PHP file upload main code explanation_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-21 16:13:27
Original
942 people have browsed it

Copy code The code is as follows:

if($_FILES['myfile'][' name'] != '') {
if($_FILES['myfile']['error'] > 0) {
echo "Error status:" . $_FILES['myfile'][' error'];
} else {
move_uploaded_file($_FILES['myfile']['tmp_name'], "uploads/" . $FILES['myfile']['name']);
echo "<script>alert(Upload successful!);</script>";
}
} else{
echo "
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template