PHP实现图片简单上传_php基础

WBOY
Release: 2016-05-17 09:44:58
Original
1193 people have browsed it

//文件上传。Linux+apache+php3/4测试通过。iis测试未通过,win+apache+php未测试  
if ($HTTP_POST_VARS["upload"]=="上传"){  
file://这里你可以加上检查文件名,格式,图片尺寸等功能,  
file://$picurl 本地系统的全路径  
file://$picurl_name 上传后的临时文件名  
file://$picurl_size 文件的大小(字节)  
file://$picurl_type 文件的MIME类型  

copy("$picurl","/where/you/want/put/the/uploaded/files/in/$picurl_name");  
exit;  
}  
?>  

  
  
accept="image/x-png,image/gif,image/jpeg">  
  
 
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template