Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望我的网址是这样的:www.app.com/projects/projectnumber
但是从我在文档中阅读的内容来看,我需要指定三个段来发送参数?
所以我得到了www.app.com/projects/index/projectnumber。无论如何我可以只用两个段来做到这一点,这样我就可以摆脱“索引”?
你可以试试这个
$route['projects/(:num)'] = "projects/index/$1";
https://www.codeigniter.com/user_guide/general/routing.html