Is there a quick way to sync two sub-stations at once?
For example, there are two sub-stations:
Aaa.hello.com
Bbb.hello.com
Two sub-stations the respective controller code is identical,
Parts of the view are not the same, related variables are the same, regardless of the view part of the first,
For the controller, the controller file name and code for the two sub-stations are the same, and are also placed in their own controller folder.
So, suppose I am in the controller in the local optimization of the code, and then, to synchronize to two sub-stations in the Controller folder, there is no quick way, without having to manually copy the locally changed folder, manually open two sub-stations, find the corresponding folder, paste operation.
Can git do it? Or do you need to write a batch of your own?
Note: Server with CENTOS7
Reply content:
Is there a quick way to sync two sub-stations at once?
For example, there are two sub-stations:
Aaa.hello.com
Bbb.hello.com
Two sub-stations the respective controller code is identical,
Parts of the view are not the same, related variables are the same, regardless of the view part of the first,
For the controller, the controller file name and code for the two sub-stations are the same, and are also placed in their own controller folder.
So, suppose I am in the controller in the local optimization of the code, and then, to synchronize to two sub-stations in the Controller folder, there is no quick way, without having to manually copy the locally changed folder, manually open two sub-stations, find the corresponding folder, paste operation.
Can git do it? Or do you need to write a batch of your own?
Note: Server with CENTOS7
Scenario 1: You can do theme, do a switch template function, different site access to different theme, a little to make judgments, but more words afraid you want to continue to use this program, resulting if more and more.
Scenario 2: You can use Git and so on, some common directory version management, when you have changed, only need to change one, and then pull the code on the machine
Scenario 3: You can use Jenkins to do automatic deployment, specific can find out how to use, not very complex.
This one?
https://walle-web.io/
1, the establishment of a domain directory, which put two domain-based configuration files:
For example aaa.hello.com.php:
For example bbb.hello.com.php:
2, in the system initialization, get $_server[' http_host ', load configuration:
include 'domain/'.$_SERVER['HTTP_HOST'].'.php';
3. Load different template files according to different $view _path when loading the view.