Discuzx3.1 solution to blank forum page

Source: Internet
Author: User
Comment: This article introduces the solution to the blank page in the Discuz Forum x3.1. I have analyzed the problem today and found the reason for the blank page, which may be caused by the compatibility of the php version, this is why some users share this situation. After analysis, it is found that it is a replacement in the sourcefunctionfunction_core.php file.

Comments: This article describes how to solve the blank page in the Discuz Forum x3.1.

I found the reason why the page was blank today, probably because of the compatibility problem of the php version, so this is only the case for some users. let's share it here.
The cause of the code in the sourcefunctionfunction_core.php file is as follows:


Static $ replacements = array (":", "@", "&", "=", "+", "$ ",",","/","? "," % "," # "," [","] ");


Replace all double quotes with single quotes.
In x3.1, a function is added to the sourcefunctionfunction_core.php file:


Function fixurl ($ url ){
Static $ fix = array ('% 3A', '% 40',' % 26', '% 3D', '% 2B', '% 24 ', '% 2C', '% 2F', '% 3f',' % 25', '% 23',' % 5B ',' % 5D ');
Static $ replacements = array (":", "@", "&", "=", "+", "$ ",",","/","? "," % "," # "," [","] ");
Return str_replace ($ fix, $ replacements, urlencode ($ url ));
}


The red part of the code appears. replace the double quotation marks with single quotation marks to solve the problem:


Static $ replacements = array (':', '@', '&', '=', '+', '$ ',',','/','? ',' % ',' # ',' [','] ');


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.