[Solved] MY_Router.php Set Route Question |
I have a custom MY_Router.php file to work to detect url when have it like
index.php?route=account/register It picks the account up as directory and register for the controller fine. If there when I want to get edit function on the account controller I would like to be able just to get like so. index.php?route=account/edit So because there is a controller controllers > account controllers > account > Register.php controllers > account > Account.php // There is a edit function in this file. Currently to get function I have to type index.php?route=account/account&function=edit PHP Code: <?php
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
I had trouble with this once and if I recall it was while building a todo list. I had something like:
tasks.php tasks/full_task.php tasks/sub_tasks.php The problem was that CI did not know where to look of course. It did not know if tasks/sub_tasks was a method in tasks.php or a controller in the actual folder tasks. The answer was to not name folders the same as controllers. Hope that might be of some help, Paul.
(07-13-2016, 07:20 PM)PaulD Wrote: I had trouble with this once and if I recall it was while building a todo list. I had something like: I have got it to work PHP Code: <?php
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
|
Welcome Guest, Not a member yet? Register Sign In |