Drupal 开启服务器调试模式

  1. On a development site I would suggest uncommenting the following lines in the settings.php file. emacs sites/default/settings.php

    if (file_exists(__DIR__ . '/settings.local.php')) {
    include __DIR__ . '/settings.local.php';

  2. and then copying the file example.settings.local.php from /sites folder to /sites/default folder and rename it to settings.local.php

    cp sites/example.settings.local.php sites/default/settings.local.php
  3. In addition to adding the following setting

    $config['system.logging']['error_level'] = 'verbose';

it also adds a few other settings which will help you in debugging and making development easier. If you don't want any of them in particular, you can always comment them out.

Note : If you think adding a file_exists call to each page will slow down the site, you can always remove it in the production code.



喜欢技术,乐于开源! 乐可开源,想改变的也只有世界!

One thought on “Drupal 开启服务器调试模式”



This site uses Akismet to reduce spam. Learn how your comment data is processed.