Weaving Dream dedecms site background can not upload pictures of the steps in detail

Source: Internet
Author: User

First step: We find the include/uploadsafe.inc.php file according to the path of the following directory

Step Two: Open the uploadsafe.inc.php file with an editing software find the following code 45 lines-59 lines:

$imtypes = array

(

"Image/pjpeg", "Image/jpeg", "Image/gif", "Image/png",

"Image/xpng", "Image/wbmp", "Image/bmp"

);

if (In_array (Strtolower (Trim (${$_key) _type '})), $imtypes))

{

$image _dd = @getimagesize ($$_key);

if (!is_array ($image _dd))

{

Exit (' Upload filetype not allow! ');

}

}

}

In the above small label two places can clearly see this picture type of code is wrong. Imgtypes refers to the picture type in the encapsulated function, what does imtypes mean? This is important causes the website backstage cannot upload the picture the question, then how should we revise? The little part has been tested. It is no doubt that 45 lines and 51 lines of $imtypes are modified to $imgtypes, and then saved to the corresponding file directory, to the site background update cache. Then you can upload the images you need to pass in the background.

Weaving Dream dedecms site background can not upload pictures of the steps in detail

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.