thinkphp Common configuration files with the configuration file combinations in their respective projects, _php tutorial

Source: Internet
Author: User

thinkphp the common configuration files and the configuration file combinations in their respective projects,


The examples in this article describe how the thinkphp public configuration files are combined with the configuration files in their respective projects. Share to everyone for your reference. The implementation method is as follows:

When using thinkphp, in the layout directory, you often use a single portal file corresponding to a project directory, but in the writing of the configuration file, in their own configuration file, often use duplicate configuration items, the use of this will put the public configuration items in a common directory.

Specific implementation methods:

Use the properties of the configuration file to return an array (), which can be defined in the configuration file in the respective project:
copy The code as follows: $config = Array (' = = ',) and then use the function to copy the code as follows: Return Array_merge (include './conf/ Config.php ', $config);

This allows you to use a common configuration file under the root directory

It is hoped that this article will be helpful to everyone's thinkphp framework design.

http://www.bkjia.com/PHPjc/917045.html www.bkjia.com true http://www.bkjia.com/PHPjc/917045.html techarticle thinkphp The common configuration files and the configuration file combinations in their respective projects, this article describes how to combine thinkphp public profiles with the configuration files in their respective projects. Share to the big ...

  • 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.