Trouble including files in godaddy

so im using a code that ive used a million times on other hosts to include files, but for some reason, in godaddy, it looks like im only able to include files that are in the same directory

so the only thing that works is this


but i have the header file in a directory called /includes

and i want to include it in a file thats located in a different directory called /account

anytime i try to do this


it gives me this error

failed to open stream: No such file or directory in /home/content/k/o/o/xxxx/html/base_directory/account/index.php

any ideas? i called godaddy, and they werent much help. might be something to do with the server configurations, which they said i would be able to change using a php ini file or an htaccess file, but didnt let me know how

im in a shared server

thanks in advance

These are just strings.
echo dirname(FILE) // put this in header.php and visit with browser

That should give you enough info to build the include(‘/path/to/file’)
You can also change the ini setting for include_path (ie where php will look by default for ‘file.php’)

I just dealt with this myself. I updated the ini file and did what the tech support guys said to do and it still doesn’t work. Can you let us know if the above works? Would help a great deal. :slight_smile:

thanks ill give that a try

ive also tried this and its not working

include ($DOCUMENT_ROOT. ‘includes/header.php’);

nor this

include ($DOCUMENT_ROOT. ‘/includes/header.php’);