Welcome Guest, Not a member yet? Register   Sign In
Route into a controller sub-directory
#1

[eluser]Edemilson Lima[/eluser]
I am having a problem with a routing...

At my routes.php, I have:

Code:
$route['([a-z]+)/([0-9]+)'] = "$1/details/index/$2";

If I go to: http://www.site.com/products/details/index/3
It works fine.
But, if I do it by the route: http://www.site.com/products/3
It calls products/details/index, but does not send the id code:

Code:
A PHP Error was encountered
Severity: Warning
Message: Missing argument 1 for Details::index()
Filename: products/details.php
Line Number: 11

"products" is a folder, "details" is the controller and "index" is its default function.


Messages In This Thread
Route into a controller sub-directory - by El Forum - 01-30-2008, 05:42 AM
Route into a controller sub-directory - by El Forum - 01-30-2008, 06:15 AM
Route into a controller sub-directory - by El Forum - 01-30-2008, 06:52 AM
Route into a controller sub-directory - by El Forum - 01-30-2008, 07:36 AM
Route into a controller sub-directory - by El Forum - 01-30-2008, 04:06 PM
Route into a controller sub-directory - by El Forum - 01-30-2008, 04:15 PM
Route into a controller sub-directory - by El Forum - 01-30-2008, 04:23 PM
Route into a controller sub-directory - by El Forum - 01-31-2008, 07:33 AM
Route into a controller sub-directory - by El Forum - 01-31-2008, 01:35 PM
Route into a controller sub-directory - by El Forum - 01-31-2008, 01:44 PM
Route into a controller sub-directory - by El Forum - 01-31-2008, 01:49 PM
Route into a controller sub-directory - by El Forum - 01-31-2008, 02:34 PM
Route into a controller sub-directory - by El Forum - 01-31-2008, 02:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB