zoukankan      html  css  js  c++  java
  • 屏蔽Drupal中的“Notice: Undefined index”警告

    原因:drupal默认使用E_ALL,即输出所有错误和警告。我们只需要修改错误显示级别即可。

    方法:

    1. 打开sitesdefaultsettings.php 追加一行 

    ini_set('error_reporting', 'E_ALL ^ E_NOTICE');

    这句话的意思是输出除了所有警告的所有错误。

    注意该文件是只读的,要先修改文件权限。

    2. 进到drupal后台,#overlay=admin/config/development/logging,将Error messages to display下面的选项从"All messages"改为"Errors and warnings"。

    参考:http://www.citytree.be/blog/undefined-index-quick-fix-in-drupal7-error-reporting

  • 相关阅读:
    知识加油站
    markdown 使用
    今日计划
    继续继续
    我回来了
    2020/5/8
    2020/5/10
    明天一定要学习了
    入驻博客园
    this is a test
  • 原文地址:https://www.cnblogs.com/mafeifan/p/3610916.html
Copyright © 2011-2022 走看看