问题
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