Jump to content

Accessing central php file, different domains, same server


someone785

Recommended Posts

Ok so if anyone can help even a tiny bit, that would be awesome:

 

I host for many clients and they all use a custom CMS that I created for their site so they can login and edit stuff. For many of these clients, various files are the exact same(like the login screen, traffic page, etc) and since I have 30+ clients, when I make changes to one of those common pages, the current method is to ftp connect to all 30 sites individually and upload the new file. As you may know, that's a huge pain. All of these sites are on my server(shared server) but the domains are all different.

 

Based on what I described, is there a way that these common php files can be accessed from one central file and then I can update 1 file and each client would see the changes to the corresponding file on their domain?

Not sure but you could add the common files into one folder on your server. Now add that folder to your include_path making the common files globally accessible.

 

Alternatively setup a cron job and create a script which checks to see if one of the common files has changed. It'll then download and replace the updated file automatically.

Not sure but you could add the common files into one folder on your server. Now add that folder to your include_path making the common files globally accessible.

 

Alternatively setup a cron job and create a script which checks to see if one of the common files has changed. It'll then download and replace the updated file automatically.

Thank you for your suggestion. I wasn't aware of being able to make a file globally accessible. In the event that I was to add a 2nd server, and thus some domains would be on 1 server and some would be on another, would that ruin the "globally accessible" idea?

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.