Home > php教程 > php手册 > PHP实现图片简单上传

PHP实现图片简单上传

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 12:37:54
Original
917 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">  
  
 
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
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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template