Resolve DedecmsV5.7 SP1 ads can not display the problem

Source: Internet
Author: User
Tags added aliyun cloud cloud hosting code compared display find

Intermediary trading http://www.aliyun.com/zixun/aggregation/6858.html"> SEO diagnostic Taobao guest owners buy cloud hosting technology hall

Recently updated to V5.7 SP1 station version, the results found that Google Alliance and Baidu Union ads can not be displayed. Contrast the source code of the previous version of the home page, found in the updated system, the ad code before double quotes are a backslash. In the online search for a moment, did not find a solution, had to investigate, and finally found the problem. I am here to share the solution, so that webmasters take less detours.

Find the ad_add.php file line 30, put this code:

if ($ normbody ['style'] == 'code')

{

$ normbody = addslashes ($ normbody ['htmlcode']);

}

Into the following code:

if ($ normbody ['style'] == 'code')

{

$ normbody = $ normbody ['htmlcode'];

}

The addslashes function adds a backslash before the specified predefined character, mainly escaping some special characters.

After the changes are saved, and then uploaded to the server, and then add the ad will be displayed properly.

Because the backslash was added before the ad code was inserted into the database, the previously added ad code in the database did not change (the backslash still exists). Just delete the ads you added earlier, then re-add it. Of course, you can also manually remove the backslash of each ad directly in the database.

Please indicate the source, source: http://www.22ph.com/info/kj/2014/0918/3448.html

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.