Welcome to the Linux community forum and interact with 2 million technical staff to upload files larger than 2 MB in php. Solution: We often upload attachments larger than 2 MB, the default php setting cannot exceed two megabytes. We can modify the php. ini configuration file to change this size
Welcome to the Linux community forum and interact with 2 million technical staff> solution for uploading files larger than 2 MB with php: We often upload attachments larger than 2 MB, the default php setting cannot exceed two megabytes. We can modify the php. ini configuration file to change this size
Welcome to the Linux community forum and interact with 2 million technicians>
Upload with phpGreater2 MB)FileOfSolutionSolution:
We often upload someGreater2 MB attachment, php default settings are not allowedGreaterIf there are two megabytes, we can modify the php. ini configuration.FileTo change the size.
Next let's take a look at thisFileRelated settings:
1. post_max_size = 10 M
The maximum data size for form submission is 10 MB.FileTo limit the size of the submitted data of the entire form.
The limit covers all content submitted by the form. For example, when posting a post, the post title, content, attachments, etc...
2. file_uploads = On
Upload allowed?FileIf it is OFF, you cannot uploadFile.
3. upload_tmp_dir = "D:/APM/PHP/uploadtemp /"
UploadFileCache directory used by the system. If the disk space of this directory is insufficient, you cannot uploadFile.
4. upload_max_filesize = 2 M
Maximum uploadFileSize.FileSingleFile.
The above are some practices. Try again.