Solution to blank page in Discuz Forum x3.1

Source: Internet
Author: User
Tags php file blank page

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:

The code is as follows: Copy code

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

Replace all double quotes with single quotes.

In x3.1, a function is added to the sourcefunctionfunction_core.php file:

The code is as follows: Copy code

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:

The code is as follows: Copy code

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.