What is the best way to execute the same php scrip

2019-02-20 21:49发布

问题:

I have a script called MY_SCRIPT which I need to upload on different server (A, B and C) for performance issue. This script is the same for all servers.

What is the best way to do that to have the less maintenance about it ?

I was thinking about that :

<?php
eval(file_get_contents("http://user:passwd@www.mysecurewebsite.com/myscript.txt"));
?>

What do you think about this ?

回答1:

Use a deployment tool to deploy this file automatically to several servers. Something like Ansible, Puppet, Chef, Capistrano or the like.



标签: php security