导航

2013年10月5日

摘要: My solution to getting Clean URL working with my multisite setup drupal 4.7I added Alias to my httpd.conf apache file: # Alias for all php drupal sites Alias /abc /var/www/html/drupal Alias /def /var/www/html/drupal Alias /xyz /var/www/html/drupalMy setup has 4 sites /drupal, /abc, /def,... 阅读全文

posted @ 2013-10-05 16:47 eastson 阅读(283) 评论(0) 推荐(0) 编辑

摘要: Drupal的注册表是指registry和registry_file两个数据表。前一个表保存所有可用的类和接口以及它们所对应的文件,后一个表保存每个文件的hash码。1. 将所有需要更新的文件都汇总的$files数组:// 需要更新的文件有两部分:一是系统includes目录下所有的.inc文件,二是模块描述文件中通过files属性声明的文件。$files = array();$modules = db_query("SELECT * FROM {system} WHERE type = 'module'")->fetchAll();foreach ( 阅读全文

posted @ 2013-10-05 10:57 eastson 阅读(348) 评论(0) 推荐(0) 编辑

摘要: Drupal通过spl_autoload_register()注册类加载器实现自动加载:function _drupal_bootstrap_database() { // ... .... spl_autoload_register('drupal_autoload_class'); spl_autoload_register('drupal_autoload_interface');}再来看看类加载器是如何实现的?function drupal_autoload_interface($interface) { return _registry_check_c 阅读全文

posted @ 2013-10-05 10:26 eastson 阅读(487) 评论(0) 推荐(0) 编辑