Esempio n. 1
0
<?php

/**
 * 程序入口
 * 
 * <pre>
 * 首先设置服务器,使用 URL_Rewrite 将网站所有连接指定到本文件中
 * 然后由本文件调用框架,分发请求。
 * </pre>
 * 
 * @package Example
 * @author eason007<*****@*****.**>
 * @copyright Copyright (c) 2007-2010 eason007<*****@*****.**>
 * @version 1.1.1.20091215
 */
/**
 * 引用框架
 */
require '../library/e_fw.php';
//将本目录加入到默认引用文件路径中
E_FW::import(dirname(__FILE__) . DS);
//定义系统配置
$Config = array('DSN' => array('dbServer' => '127.0.0.1', 'dbPort' => '3306', 'dbName' => 'test', 'dbUser' => 'root', 'dbPassword' => '', 'dbType' => 'Mysql'), 'VIEW' => array('class' => 'smarty', 'template_dir' => '.' . DS . 'Res', 'compile_dir' => '.' . DS . 'Compiler', 'left_delimiter' => '${'), 'CONTROLLER' => array('defaultController' => 'Index'), 'CACHE' => array('type' => 'memcache', 'isSerialize' => true, 'prefix' => 'test.'));
//将配置数组加入到全局变量中
E_FW::set_Config($Config);
//Start
E_FW::run();