Welcome Guest, Not a member yet? Register   Sign In
Controller with name 'list'
#1

[eluser]freshface[/eluser]
I want to create a controller with the name 'list' is it possible (and how) to override the reserved php keyword to use it.
Or could I solve it with routes? And how.

Thx
#2

[eluser]Colin Williams[/eluser]
Code:
$route['list'] = 'my_list';
$route['list/(.+)'] = "my_list/$1";
#3

[eluser]kevinprince[/eluser]
Definitely solve it with routes, you really dont want to be going around overwriting PHP core functionality because its likely to cause you issues down the road.
#4

[eluser]Colin Williams[/eluser]
List is an odd controller name, anyway. Pretty generic.




Theme © iAndrew 2016 - Forum software by © MyBB