Different domain name access is the same database, different templates, how to implement?

Source: Internet
Author: User

Before blogging in the blog Park, today in a project, encountered a problem, usually love to visit the blog Park to solve the problem, but this encounter the situation is more special, the site cannot search the answer, so send a blog to see how each way PHP Master

The project I am developing is a CMS website management system

The company has more than 10 customer service, each customer service corresponding to a website, the current use of the dream weaving process, more than 10 sites, are different databases. Simply put, their website is independent! The above is the respective contact way!

The trouble is: for example, the company's new to a product, I have to land one by one of their website backstage, one of the added goods, feel very troublesome!

Now think: I write a CMS, their website are unified, then add their own products will not be so troublesome. Adding it once is enough. Efficiency is greatly improved.

The effect I want is: Www.aaa.com shows the page of template muban_a. The database is data.

Www.bbb.com Displays the page of the template muban_b. The database is also data.

Www.ccc.com Displays the page of the template Muban_c. Data is the same as the database.

Www.ddd.com Displays the page of the template muban_d. The database is data.


The question is, how do I write it? How do I implement this feature?

Different domain name access is the same database, different templates, how to implement?

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.