What should I set my PHP include path?

Status
Not open for further replies.

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi,

You shouldn't need to alter your include_path variable to include a file. Instead, you could include the file relative to your current one. Your file is in /public_html/examples/fragments, but your functions.php file is in /public_html. Therefore, you could use require_once('../../functions.php'); to call your file in your script. ;)

Alternatively, if you really want to change your include_path (though I would not recommend it), please try setting it to the full path (which starts with /home/tlocx10h).

Thank you,
 

dsktopx1

New Member
Messages
8
Reaction score
0
Points
1
Hi,

You shouldn't need to alter your include_path variable to include a file. Instead, you could include the file relative to your current one. Your file is in /public_html/examples/fragments, but your functions.php file is in /public_html. Therefore, you could use require_once('../../functions.php'); to call your file in your script. ;)

Alternatively, if you really want to change your include_path (though I would not recommend it), please try setting it to the full path (which starts with /home/tlocx10h).

Thank you,

For some reason, it still isn't working. I tried both methods.
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi,

I changed your include_path to /home/tlocx10h/public_html/ for you. Please could you check again?

Thank you,
 
Status
Not open for further replies.
Top