Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

PHP 

Trying to configure routes in CodeIgniter

Let's say I have this one:

PHP Code

<?php 
$route
['profile/(:any)'] = 'profile/index/$1'; 

That will take any profile/some_profile to the proper page, what's good.

Now I've made a function for profile comments. Obviously, because the above route, the function is not accessable.

So I'm trying to do something like this:

PHP Code

<?php 
$route
['profile/(:any)/addcomment'] = 'profile/index/$1/addcomment'; 

But that would do just nothing. Tried changing place of these two routes, but not of help.

How can I have both of these routes working? One for profile page, one which would load the funtion?


Possibly Related Threads...
Thread / Author Replies Views Last Post
[PHP] by CarrotDec 24, 2020 01:00 PM 2 115 Dec 24, 2020 01:00 PM
Last Post: тнe randoм dυтcн gυy
[PHP] by LANCEOct 27, 2019 08:19 AM 4 231 Oct 27, 2019 08:19 AM
Last Post: ign0ranc3
[PHP] by inf0Oct 17, 2018 10:06 AM 4 246 Oct 17, 2018 10:06 AM
Last Post: newQuery