图片的下传有关问题

WBOY
Release: 2016-06-13 12:51:52
Original
883 people have browsed it

图片的上传问题
我用time()作为上传图片存在指定目录的图片名称,那么我该怎么获取这个名称呢?$_FILES['pic']['tmp_name']是获取临时名字的,而$_FILES['pic']['name']是获取原文件名的,求助.....


------解决方案--------------------
$arr= pathinfo('f.php');<br />
$extend = strtolower($arr["extension"]);<br />
move_uploaded_file($_FILES["pic"]["tmp_name"], "upload/" . time().'.'.$extend);
Copy after login
Related labels:
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