I have a site with this simple structure:
\public_html
{files}.php
\files
\es
For the public_html I created a domain site.com and for the public_html/es I created spanishsite.com domain. The problem is: I need to access the FILES directory in the Spanish domain… so, how can I do this?
Thanks
It sound like you’re trying to link to the file, rather than just read it from PHP.
Of course, since you’re serving
/es/on that domain, you web-server won’t serve files above that directory.You’ve two choices:
1) The easiest, just symlink
filesintoes/and link to that:In your PHP file, link to files/, just as if it where inside
es/.If your server runs windows, you’ll have to use
mklinkinstead of ln. Check the manual to know the exact arguments you need.2) Configure your webserver to serve the
/files/directory of the spanish domain from a different path; the path where thefilesis currently located to be precise. How to do this will depends strongly on what webserver you’re using, and you’ll have to reconfigure this any time you change it, as well as replicate this configuration on any test servers, etc.