Jump to content

Include file from previous directory


Fender963

Recommended Posts

I am having trouble getting this to work.

Say i have index.php which is located in public_html/files/extras/index.php

and then I have a file i wish to include which is in public_html/includes/variables.php

I can't simply do a call
[code]include 'directory/file.php';[/code]

because the directory is "behind" the current directory.

but when I do
[code]include ("http://www.mydomain.com/includes/variables.php");[/code]

I can't access the variables for the reason explained in this thread I found while searching for an answer:

http://www.phpfreaks.com/forums/index.php/topic,108540.0.html

Is there a workaround?

- Kyle
Link to comment
https://forums.phpfreaks.com/topic/29490-include-file-from-previous-directory/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.