Is there a quick way to synchronize the stations?

Source: Internet
Author: User
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.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.