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 (':', '@', '&', '=', '+', '$ ',',','/','? ',' % ',' # ',' [','] ');