Bun Wong's Blog

专注于 Web 应用程序开发

2009年05月

深入 Drupal 引导流程 (3) - session_set_save_handler

2009/05/26 •

接下来是 Drupal 的会话阶段,Drupal 是采用 PHP 内置的会话机制,但是它重载了 PHP 内置的会话处理器 (PHP 内建处理是把会话保存为文件方式的),把会话数据保存在数据库内。

case DRUPAL_BOOTSTRAP_SESSION:
  require_once variable_get('session_inc', './includes/session.inc');
  session_set_save_handler('sess_open', 'sess_close', 'sess_read', 'sess_write', 'sess_destroy_sid', 'sess_gc');
  session_start();
  break;

...

深入 Drupal 引导流程 (2)

2009/05/20 •

这段时间一直在研究 Drupal 的源代码,哈哈,少时间来更新 Blog,今天我们再续 Drupal 的引导流程

case DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE:
  // Allow specifying special cache handlers in settings.php, like
  // using memcached or files for storing cache information.
  require_once variable_get('cache_inc', './includes/cache.inc');
  // If the page_cache_fastpath is set to TRUE in settings.php and
  // page_cache_fastpath (implemented in the special implementation of
  // cache.inc) printed the page and indicated this with a returned TRUE
  // then we are done.
  if (variable_get('page_cache_fastpath', FALSE) && page_cache_fastpath()) {
    exit;
  }
  break;

早期页面缓存阶段...

0516 华南植物园

2009/05/18 •

那天天气不错,带上老婆和小姨子,去华南植物园喂蚊子去。植物园固然没有动物园这么生气勃勃,但对于我们这种天天忙碌工作着的人来说,倒是一个能够更加亲近大自然的地方。

深入 Drupal 引导流程 (1)

2009/05/11 •

对于每个请求,Drupal 通过一系列的引导指令阶段来引导它自己。这些阶段在 bootstrap.inc 中定义

/**
* First bootstrap phase: initialize configuration.
*/
define('DRUPAL_BOOTSTRAP_CONFIGURATION', 0);
...

SPL autoload 初体验

2009/05/07 •

昨天终于把项目的东西赶了出来,有点累,但是满有成就感,哈…… Drupal 看了两周,算是对 HOOK 部分有了个大概了解,不得不感慨下老外的设计思想确实很值得我们去学习,为啥国人就做不出一个像样点的 CMS 来呢?!或者准确点来说 Drupal 压根不能归类于 CMS 吧,很建议大家去研究下,前段时间我就吐血推荐给标老大去玩玩,算是对开源界做点贡献,哈哈 :)

...

Google Analytics

最近一个月访问数:544