Welcome Guest, Not a member yet? Register   Sign In
Quick Route Question - it doesn't work!
#11

[eluser]Colin Williams[/eluser]
Well, damn. We've been on the same page all along! Your route for that specific URI would look like

Code:
$route['tiger'] = 'pets/view/tiger';

Or you can keep it more automatic with something like

Code:
$route['(:any)'] = "pets/view/$1";

But you have to consider the implications of a catch-all route like that
#12

[eluser]timattz[/eluser]
I know. That's my question. Thats what I have and it doesn't work... except my version has double quotes and yours has single quotes. It just goes to the controller and ignores the view and the variable.

So that format is correct? I was thinking that it wasn't working because my variable is a string instead of a integer like they use in the example. Maybe my install just isn't working... older version or something.
#13

[eluser]darkhouse[/eluser]
I wonder if it's the 'view' segment. Try changing it to 'display' and see if that helps. I thought I read someone else had an issue with using the word 'view', and I seem to recall it was something to do with their version of PHP.
#14

[eluser]Colin Williams[/eluser]
"view" is a reserved method in PHP 4. If you are still using PHP 4, take a long long long look in the mirror. Smile
#15

[eluser]Colin Williams[/eluser]
Also, provide the basics of your "pets" controller, otherwise we are all taking shots in the dark




Theme © iAndrew 2016 - Forum software by © MyBB