TP5.0:同一个控制器访问不同方法

  首先,我把TP框架的内容放置在manualtp5文件夹

  在manualtp5/application/index/controller/index控制器中定义两个方法:

  我们都知道,如果我们网址中不输入具体方法名,服务器会默认去访问index方法,所以我们访问index控制器中的idnex方法,只需要输入网址:

  localhost/manualtp5/public

  

  如果我们要访问的是Index控制器中的hello方法的话,我们需要在网址中输入:

  http://localhost/manualtp5/public/index.php/index/index/hello

  以上

  END

原文地址:https://www.cnblogs.com/finalanddistance/p/8897707.html