Welcome Guest, Not a member yet? Register   Sign In
Newbie: urls Relative to Controller
#1

[eluser]Unknown[/eluser]
Just getting started with CodeIgniter, and I'm having a problem with urls that I cannot figure out.

I call a controller (e.g. 'index.php/orgs/'). It calls the index function in the orgs controller, which loads a view. In the view, I use the url helper function:

<?=anchor('orgs/edit/'.$org->id, 'Edit') ?>

The resulting link is index.php/orgs/edit/1.

If I don't use the helper function (just use a href=), I get:

index.php/orgs/orgs/edit/1.

Okay, so I'll use the helper function, but in the tutorials, relative links seem to work with or without the helper functions.

What am I missing?


Messages In This Thread
Newbie: urls Relative to Controller - by El Forum - 02-13-2010, 04:46 AM
Newbie: urls Relative to Controller - by El Forum - 02-13-2010, 05:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB