DEDE to modify the size limit for uploading a single picture in a background atlas

Source: Internet
Author: User

By default, the single picture size within the Dede is limited to 2M, and sometimes we need to upload more than 2M files, which can be achieved by modifying several files.

First, need to modify php.ini This file, we must ensure that the PHP configuration allows uploading a larger file before the line, or the subsequent work done is useless.

Open PHP.ini and find the following two statements:
Post_max_size =2m
Upload_max_filesize =2m
By default, both are limited to 2M.

We first need to change these two configuration items to meet our requirements of the size, I changed to 10M. Then restart the Apache service.

Note: If you are buying space, space quotient generally limit the upload_max_filesize to 2M, and the space quotient will not modify this configuration for you, so the solution can only reduce the quality of the picture ~ even after the modification of the effect!

Second, modify the Dede Atlas upload file.
Open the/dede/templets/directory under album_add.htm and album_edit.htm two files, find the following code:
File_size_limit: "2 MB",//2MB
Here is the Dede limit Atlas picture size settings, the 2M changes here to you need, save, test success.

Attached: After the modified test, upload the picture when you encounter the following prompt:
Fatal error:allowed memory size of 41943040 bytes exhausted (tried to allocate 24512 bytes) in D:\APMServ5.2.6\www\htdocs \include\helpers\image.helper.php on line 254
Baidu half a day later found that the original PHP configuration file
Memory_limit = 40M
This configuration to the value is too small, changed to 128M after the resolution is done!


Aitecms, Enterprise Template Quick Build station expert, click to learn more

Reprint self-weaving Dream Template Tutorial (www.dede58.com)

DEDE to modify the size limit for uploading a single picture in a background atlas

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.