When uploading ...LOGIN

When uploading files, you need to pay attention to the php.ini file.

You need to pay attention to the php.ini file when uploading files

Before formally explaining the upload in this chapter, the first thing we need to pay attention to is the php.ini file.

This is our first introduction to how to modify the php.ini file. If your configuration items are inconsistent with what we said, please pay attention to the modification.

Let’s understand each configuration item.

Let’s take a look at how to modify php.ini.

There are too many php.ini files. If you can’t find them, you can use ctrl+f to search for related configuration items.

##file_uploads on is to turn on the file upload function, off is to turn it offpost_max_sizeThe maximum value of POST parameters allowed by the system upload_max_filesizeThe maximum size of uploaded files allowed by the systemmemory_limitMemory usage limit
Configuration itemFunction description

Recommended size: file_size (file size) < upload_max_filesize < post_max_size < memory_limit

In addition, you need to pay attention to the script execution time.

max_execution_time, the unit of this parameter is seconds.

This parameter is to set the maximum execution time of the script.
You can also make appropriate changes according to your needs. Usually there is no need to modify it, the system default value is enough. When uploading very large files, this parameter may be modified.

The upload time is too long and will time out. If you set this parameter to 0, the timeout period is not limited and is not recommended.

After completing the relevant configuration of php.ini, we can start trying to complete the first file upload.


Next Section

1
2
<form action="" enctype="multipart/form-data" method="post"
name="uploadfile"><input type="file" name="upfile" /><br>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
submitReset Code
ChapterCourseware