1800 upload_max_filesize = 100M -> 800M..."."/> 1800 upload_max_filesize = 100M -> 800M...".">

Home  >  Article  >  Backend Development  >  How to solve the problem of PHP upload writing failure

How to solve the problem of PHP upload writing failure

藏色散人
藏色散人Original
2021-03-25 10:28:452155browse

Method to solve PHP upload writing failure: first find and open the "php.ini" file; then modify the content to "default_socket_timeout = 60 -> 1800 upload_max_filesize = 100M -> 800M..." That is Can.

How to solve the problem of PHP upload writing failure

The operating environment of this article: Windows 7 system, PHP version 7.1, DELL G3 computer

When php uploads files, it prompts "File writing failed "

Specific problem:

When php uploads a file, it prompts "File writing failed"

Uploaded file size: 436M, found that the uploaded file is larger than When 130M, the file upload failure is reported

Solution:

Adjust /usr/local/php/etc/php.ini

default_socket_timeout = 60 --> 1800   网络套接字默认超时时间
upload_max_filesize = 100M ---> 800M   上传文件尺寸限制
max_file_uploads = 150  ---> 190    最大上传文件数量
post_max_size = 100M  ---> 800M   POST尺寸
max_execution_time = 1800    最大执行时间

【 Recommended learning: PHP video tutorial

The above is the detailed content of How to solve the problem of PHP upload writing failure. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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