## 入口路由
微擎有2個入口文件
1. /web/index.php
2. /app/index.php
兩個入口的路由類似,下面以`/web/index.php`的路由為例介紹
**路由變量**
~~~
$controller = $_GPC['c']; //web入口缺省值=account,app入口=home
$action = $_GPC['a']; //index.php入口文件開頭`$acl`變量可配置默認方法
$do = $_GPC['do'];
~~~
不管$action是什么都會:
~~~
require IA_ROOT . "/web/source/{$controller}/__init.php";
~~~
*$action未配置,則使用$controller目錄下的第一個.strl.php文件的文件名作為$action*
* * * * *
**路由結果**
~~~
require IA_ROOT . '/web/source/' . $controller . '/' . $action . '.ctrl.php';
~~~
* * * * *
**控制器配置說明**
~~~
$acl = array(
'控制器名稱' => array(
'default' => '缺省方法',
'direct' => array(
'無需登錄驗證的方法',
'無需登錄驗證的方法'
),
'founder' => array(
'只有創始人能調用的方法'
)
),
...
~~~