在不同的服务器上执行相同的 php 脚本的最佳方法是什么? [英] What is the best way to execute the same php script on different server?
本文介绍了在不同的服务器上执行相同的 php 脚本的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个名为 MY_SCRIPT 的脚本,我需要将其上传到不同的服务器(A、B 和 C)上以解决性能问题.此脚本对所有服务器都相同.
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 ?
我正在考虑:
<?php
eval(file_get_contents("http://user:passwd@www.mysecurewebsite.com/myscript.txt"));
?>
您对此有何看法?
推荐答案
使用部署工具将此文件自动部署到多个服务器.类似于 Ansible、Puppet、厨师、Capistrano 等.
Use a deployment tool to deploy this file automatically to several servers. Something like Ansible, Puppet, Chef, Capistrano or the like.
这篇关于在不同的服务器上执行相同的 php 脚本的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文