• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.