Welcome Guest, Not a member yet? Register   Sign In
require relative path is messed up
#1

[eluser]gloosemo[/eluser]
inside the application folder i have 2 folders, controllers and third_party.

In my controllers folder i have register.php, which contains a class with the require statement:

Code:
require_once('/application/third_party/functions.php');

which seems to work fine. but i need a relative directory because when i put online the application folder will be in parent directory to the website. i think the relative path should be

Code:
require_once('../third_party/functions.php');

but this fails. I've also tried

Code:
require_once('../../third_party/functions.php');

i'm pretty positive the first one is correct, but no dice. WTF?

thanks, g




Theme © iAndrew 2016 - Forum software by © MyBB