导航

2013年10月7日

摘要: Drupal整个启动过程共分为8个阶段:DRUPAL_BOOTSTRAP_CONFIGURATION:initialize configuration DRUPAL_BOOTSTRAP_PAGE_CACHE:try to serve a cached page DRUPAL_BOOTSTRAP_DATABASE:initialize database layer DRUPAL_BOOTSTRAP_VARIABLES:initialize the variable system DRUPAL_BOOTSTRAP_SESSION:initialize session han... 阅读全文

posted @ 2013-10-07 16:51 eastson 阅读(567) 评论(0) 推荐(0) 编辑

摘要: Drupal的后台数据库中有很多以cache开头的表,这些都是Drupal的缓存数据表。Drupal的缓存机制使用了接口方式,所有的缓存对象都必须实现DrupalCacheInterface接口:interface DrupalCacheInterface { function get($cid); function getMultiple(&$cids); function set($cid, $data, $expire = CACHE_PERMANENT); function clear($cid = NULL, $wildcard = FALSE); function isE. 阅读全文

posted @ 2013-10-07 16:03 eastson 阅读(608) 评论(0) 推荐(0) 编辑

摘要: Drupal的系统变量都保存在数据库variable表中:然后,开发人员可以通过下面的API函数操作这些系统变量:function variable_get($name, $default = NULL) { global $conf; return isset($conf[$name]) ? $conf[$name] : $default;}function variable_set($name, $value) { global $conf; db_merge('variable')->key(array('name' => $name))-&g 阅读全文

posted @ 2013-10-07 15:47 eastson 阅读(302) 评论(0) 推荐(0) 编辑