How to get value from URL in CodeIgniter?

大憨熊 提交于 2019-12-13 10:29:34

问题


I had a url http://localhost/tasty/index.php/admin/edititems?id=20. I have to get the value 20.


回答1:


You can do this:

$this->input->get('id', TRUE);

I'd recommend checking out the docs here: http://www.codeigniter.com/user_guide/libraries/input.html



来源:https://stackoverflow.com/questions/37042468/how-to-get-value-from-url-in-codeigniter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!