Welcome Guest, Not a member yet? Register   Sign In
Relative URL
#2

[eluser]CroNiX[/eluser]
Everything is relative to INDEX.PHP, since that's actually the file being executed by PHP. Starting a path with a / isn't really "relative", it's the root of the device (usually a hard disk).

But if you're loading a model, why not just use $this->load->model('classes1/classes2/classtouse.php') ??

You also can use the APPPATH constant defined at the bottom of index.php (along with others), which is the full path to the /application directory, but I prefer just using the built in CI loader class which works for 99% of things.


Messages In This Thread
Relative URL - by El Forum - 07-28-2014, 04:50 PM
Relative URL - by El Forum - 07-28-2014, 05:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB