PHP上传文件的原理是什么?

WBOY
Release: 2016-06-06 20:43:12
Original
1070 people have browsed it

是上传到临时目录,然后将临时目录的文件根据需要写入到指定目录吗?但是在写入目录之前的话是先读进内存里面吗?如果读进内存里面。那服务器岂不是读进去几个大文件就崩掉了?

回复内容:

是上传到临时目录,然后将临时目录的文件根据需要写入到指定目录吗?但是在写入目录之前的话是先读进内存里面吗?如果读进内存里面。那服务器岂不是读进去几个大文件就崩掉了?

先了解一下php.ini中的upload_max_filesize,post_max_size,memory_limit
服务器不会崩溃,但会上传失败。

临时目录我没记错的话一般是 /tmp 目录。

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!