Hello all. I am doing something that is quite hard for my little pee brain to explain. I have two domains (on a virtual shared server) granted permissions to share files (one way). DomainA has the system files and DomainB requests those files. Actually, DomainB is requesting a PHP file which builds the site.
I am doing it this way so that many domains could run off of the same files (from one system space) which makes updates easier. Everything that is PHP is rendering fine. However, when the PHP echo's HTML code that has paths, the paths are wrong. So, absolute and relative paths both look within DomainB for the files. But the files are in DomainA. Does this make sense? If so, any ideas on how I can tell it to look in DomainA without putting a full relative path (I don't want users to be able to see that path).
Server-Side-like Paths
Moderator: General Moderators
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Server-Side-like Paths
I do somethign very similar.
On each domain you will need at least a single index.php as an access point. Inside the index.php you will specifiy the directory via chdir(). This sets the base path for everything else
On each domain you will need at least a single index.php as an access point. Inside the index.php you will specifiy the directory via chdir(). This sets the base path for everything else
Re: Server-Side-like Paths
Could you give me an example of how it would work?PCSpectra wrote:I do somethign very similar.
On each domain you will need at least a single index.php as an access point. Inside the index.php you will specifiy the directory via chdir(). This sets the base path for everything else
Re: Server-Side-like Paths
Thinking about the chdir() ... the problem with this is that it will show the path in the HTML code and I don't want the user to know where the files exist.