If I do not specify a value in the URL for Codeigniter, it will display a PHP error that has occurred saying that there is no argument to call the function. I do NOT want it to appear at all. If the URL has no arguments, it should just redirect to its index function. How can I prevent this?
For example, www.example.com/profile/id/45
would anyone guess and enter this "www.example.com/profile/id"
which will generate an error. How can I prevent this? I tried "if (! Isset ($ id))", but it generated an error before reaching this condition.
source
share