The Router class
Router类
Our Router class will have to analyze the request, and then load the correct command. First step is to create a basic skeleton for the router class:
我们的Router类将要解析请求,然后载入正确的明亮。第一步是创建Router类的基本框架:
<?php
Class Router {
private $path;
}
?>
And then add the following lines to the index.php file:
然后在index.php文件中加入下面几行代码:
# Load router
$router = ne


:lol| |
|
<?PHP |