zoukankan      html  css  js  c++  java
  • 重新安装Drupal?

    因个人需要需要重新安装Drupal。如何操纵呢?Drupal是在_drupal_bootstrap_database()函数里面检查是否已经安装过的。检查的依据是有没有$GLOBALS['databases']设置,或者是有没有设置常量MAINTENANCE_MODE=install。

    function _drupal_bootstrap_database() {
      // Redirect the user to the installation script if Drupal has not been
      // installed yet (i.e., if no $databases array has been defined in the
      // settings.php file) and we are not already installing.
      if (empty($GLOBALS['databases']) && !drupal_installation_attempted()) {
        include_once DRUPAL_ROOT . '/includes/install.inc';
        install_goto('install.php');
      }
      
      ... 
    }
    
    /**
     * Returns TRUE if a Drupal installation is currently being attempted.
     */
    function drupal_installation_attempted() {
      return defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'install';
    }


    $GLOBALS['databases']定义在sites/default/settings.php,Drupal安装时自动生成该文件。所以,要重新安装Drupal,简单地删除sites/default/settings.php就可以。

  • 相关阅读:
    投产包错误的思考
    Oracle----用户操作
    3.27 学习记录
    3.26 学习记录
    3.25 学习记录
    3.24 学习记录
    3. 23构建之法读后感
    3.22 学习记录
    3. 21学习记录
    3.20 学习记录
  • 原文地址:https://www.cnblogs.com/eastson/p/3680207.html
Copyright © 2011-2022 走看看