My routes aren't passing arguments |
[eluser]NSGReaper[/eluser]
So I'm currently working on the file download script for a site. Files can be downloaded either by using: http://mysite/download/34 or http://mysite/download/project.pdf. That is the plan at least, these should be routed to files/getbyid and files/getbyname respectively but while I know that the right function is called no arguments are being passed to it. Code: $route['download/:num'] = "files/getbyid"; Code: class Files extends Controller { With it setup like this I always get the die() message. I have been able to make it work using regex like so: Code: $route['download/([0-9]*)'] = "files/getbyid/$1"; However it was my understanding that these were synonymous. Have I misunderstood the user guide or is something wrong? |
Messages In This Thread |
My routes aren't passing arguments - by El Forum - 09-24-2007, 08:39 AM
My routes aren't passing arguments - by El Forum - 09-24-2007, 08:51 AM
My routes aren't passing arguments - by El Forum - 09-24-2007, 09:05 AM
My routes aren't passing arguments - by El Forum - 09-24-2007, 01:47 PM
My routes aren't passing arguments - by El Forum - 09-24-2007, 11:19 PM
|