URI Routing with folders |
[eluser]sqwk[/eluser]
I have the current folder structure inside Controllers: Code: - controllers Using routes this works: Code: $route['default_controller'] = "main"; However this will produce an error: Code: $route['admin/statischeseiten'] = "admin/static"; There is no controller called admin, just the folder called admin with a controller called static. The error is this: Code: Parse error: syntax error, unexpected T_STATIC, expecting T_STRING in /home/lorem/ipsum/system/application/controllers/admin/static.php on line 3 where line 3 has the Class declaration: Code: <?php What am I doing wrong here?
[eluser]danmontgomery[/eluser]
Static is a reserved php keyword, you can't use it as the name for your class.
[eluser]danmontgomery[/eluser]
Yep... You can see the full list at http://www.php.net/manual/en/reserved.keywords.php |
Welcome Guest, Not a member yet? Register Sign In |