Home >Backend Development >PHP Tutorial >Teach you how to simply upload images in PHP
//File Upload. The linux+apache+php3/4 test passed. The iis test failed, win+apache+php was not tested
if ($HTTP_POST_VARS["upload"]=="upload"){
file://Here you can add functions such as checking file name, format, image size, etc.
file://$picurl The full path of the local system
file://$picurl_name Temporary file name after upload
file://$picurl_size file size (bytes)
file://$picurl_type The MIME type of the file
copy("$picurl","/where/you/want/put/the/uploaded/files/in/$picurl_name");
exit;
}
?>
The above has introduced how to implement simple image upload in PHP, including the content of image upload. I hope it will be helpful to friends who are interested in PHP tutorials.