https://www.jianshu.com/p/c43fb5817ae1php
\think\Url::root('index.php?s=');
以後就生成的URL是第二種模式。
$request = Request::instance();echo "當前模塊名稱是" . $request->module();echo "當前控制器名稱是" . $request->controller();echo "當前操做名稱是" . $request->action();echo "<Br>";echo url("HelloWorld/index",'id=5&name=thinkphp').'<br>';echo url('HelloWorld/index?id=5&name=thinkphp').'<br>';輸出當前模塊名稱是index當前控制器名稱是HelloWorld當前操做名稱是indexindex.php?s=/index/hello_world/index/id/5/name/thinkphpindex.php?s=/index/hello_world/index/id/5/name/thinkphp