someone785 Posted January 3, 2014 Share Posted January 3, 2014 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? Quote Link to comment https://forums.phpfreaks.com/topic/285071-accessing-central-php-file-different-domains-same-server/ Share on other sites More sharing options...
Ch0cu3r Posted January 3, 2014 Share Posted January 3, 2014 (edited) 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 January 3, 2014 by Ch0cu3r Quote Link to comment https://forums.phpfreaks.com/topic/285071-accessing-central-php-file-different-domains-same-server/#findComment-1463748 Share on other sites More sharing options...
someone785 Posted January 3, 2014 Author Share Posted January 3, 2014 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? Quote Link to comment https://forums.phpfreaks.com/topic/285071-accessing-central-php-file-different-domains-same-server/#findComment-1463755 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.