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?

Link to comment
Share on other sites

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.

Edited by Ch0cu3r
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.