ZBP1.7.2 update:
Zbp1.7.2 has a built-in method to force the debug mode on.
Just find zb_system/function/c_system_base.php
On line 22, change
//defined('ZBP_DEBUGMODE') || define('ZBP_DEBUGMODE', true);
Remove the previous//to force the debug mode to start.
If your application version is 1.7.2 and above, you don't need to look down.
The following is the old version:
Those familiar with Z-Blog know that there is a debug mode (development mode) in its website settings and global settings. If our website reports an error for unknown reasons, you can turn on the debug mode switch to quickly locate the cause of the error.
Or your website makes an error. Go to the Z-Blog official forum to post for help. You also need to open the debug mode screenshot so that everyone can judge the cause of the error.
But there is a situation that may make ordinary users helpless.
You have done some operations, and the background of the website cannot be accessed. How do you open the debugging mode at this time?
Take a chestnut:
After doing some operations, I found that the website reported an error!
So I wanted to go into the background and open the debugging mode, but I found that the background could not enter!!
At this time, my mood is broken!! 😩😩😩
What should I do? Do you want to restore the website backup?
Or change the database?
ZC_DEBUG_MODE is found in the config table, b: 0 is changed to b: 1
Is this too unfriendly for ordinary users?
In fact, the solution is very simple
We found the zb_system support error.php file in the website directory.
Add the following code to the second line:
$GLOBALS['option']['ZC_DEBUG_MODE']=1;
Refresh the webpage and find that the error message has been very detailed.
It turns out that I intentionally wrote a ";" in a section of code in the include.php file of the currently used theme.???
Thus, the problem was solved.
As for the principle of this operation, no one should care.
Strictly speaking, this is not to open the debugging mode, but to make ZB output more detailed error code in a "cheat" way!
Don't mind so much, just use it!!!
Note: After the problem is solved, please delete the code you added.