交换机 路由器 区别 建立文件交换功能的脚本(三)

php.cn
Release: 2016-07-29 08:33:27
Original
1138 people have browsed it

//do.php执行上载的文件
当你按下了提交按钮后,文件将会从你的计算机上传到服务器的临时目录下。
在临时目录下的文件名为一个临时文件。应该使用file字段的name值来访问它,在这里为$myfile。
真正的文件名使用file字段的name值加上"_name"来访问它,在这里为$myfile_name。
使用copy()函数,将临时文件$myfile拷贝到指定目录下,拷贝后的文件名为$myfile_name。
完成后不要忘了删除临时文件,不然你会有许多你不想要的文件。
另外你对你指定的目录要有读写权限。在这里是/usr/local/apache/htdocs/file/


保存文件

//3绉
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 [email protected]
Latest Issues
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!