【发布时间】:2016-10-18 18:37:44
【问题描述】:
我正在使用 Codeigniter 版本 2。在我的项目中,我遵循 HMVC 模式。但现在我想编写 REST api Web 服务。对于 Web 服务,我下载了库 REST_Controller.php。
在我添加库后,按照 HMVC 模式为 wirte webservices 创建一个文件夹。在 webservices 类中创建函数后,我必须以这种格式http://localhost/project_name/index.php/webservices/login 编写 url。
但我不想要这种格式的网址,我想要下面的格式http://localhost/amoeba/webservices/login。请建议我如何在 Codeigniter 中编写 Web 服务。
【问题讨论】:
标签: php web-services codeigniter codeigniter-2