Moodle: 开启错误提示

config.php file:

$CFG->debug = 38911; $CFG->debugdisplay = true;

For Moodle 2.0 the possible settings are as follows:

// Force a debugging mode regardless the settings in the site administration
// @error_reporting(1023);  // NOT FOR PRODUCTION SERVERS!
@ini_set('display_errors', '1'); // NOT FOR PRODUCTION SERVERS!
// for Moodle 2.0 - 2.2, use:  $CFG->debug = 38911;  
$CFG->debugdisplay = true;   // NOT FOR PRODUCTION SERVERS!
// You can specify a comma separated list of user ids that that always see
// debug messages, this overrides the debug flag in $CFG->debug and $CFG->debugdisplay
// for these users only.
$CFG->debugusers = '2';

$CFG->debug = 38911; $CFG->debugdisplay = true; 
define('MDL_PERF', true);
define('MDL_PERFDB', true);
define('MDL_PERFTOLOG', true);
define('MDL_PERFTOFOOT', true);

@error_reporting(E_ALL | E_STRICT);
@ini_set('display_errors', '1');
$CFG->debug = (E_ALL | E_STRICT); 
$CFG->debugdisplay = 1;

或者 database:


Using a tool like phpMyAdmin, execute the following SQL commands:

UPDATE mdl_config SET VALUE = 2047 WHERE name = 'debug';
UPDATE mdl_config SET VALUE = 1 WHERE name = 'debugdisplay';

To turn it back off, use the admin screens, or the commands:

UPDATE mdl_config SET VALUE = 0 WHERE name = 'debug';
UPDATE mdl_config SET VALUE = 0 WHERE name = 'debugdisplay';

(If you use a different database prefix, you will need to adjust those commands accordingly.)



原文:Moodle: 开启错误提示


Add a Comment

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.