thinkphp configuration item (vi)

Source: Internet
Author: User

Original: thinkphp configuration item (vi)

Configuration Items--This is only part of the configuration, the late will be ready to update share with you
1: Modify URL delimiter
Directory: thinkphp\home\conf\config.php Open the profile code by adding:
' Url_pathinfo_depr ' + ' _ ',//change the access delimiter to "/" + "-" note that if the change is not effective then the runtime is deleted
Http://localhost/thinkphp/index.php/Index-index

' Tmpl_l_delim ' = ' <{',//Modify left delimiter--and template use by {} ==> <{}>, in order to avoid conflicts with other template plugins
' Tmpl_r_delim ' = '}> ',//Modify right delimiter

Database Connection Configuration
' Db_type ' = ' mysql ',//Set Database type
' db_host ' = ' localhost ',//Set up host
' db_name ' = ' test ',//Set database name
' Db_user ' + ' root ',//set user name
' Db_pwd ' + ',//Set Password
' Db_port ' = ' 3306 ',//Set port number
' Db_prefix ' = ', '//Set table prefix
You can also configure the database in DSN mode---concise, if 2 configuration methods exist in the system priority DNS
' Db_dsn ' = ' mysql://root: @localhost: 3306/thinkphp ',


Turn on the page_trace in the debug function (there will be a small icon in the lower right corner of the page after opening to facilitate debugging)
1. Turn on the Debug function (note: If the template is not shown, the small icon on the right will not come out OH)
3. Open the debug mode, the entry file Plus (index.php)
Define (' App_debug ', true);
2. We need to set the configuration file to open the page trace

' Show_page_trace ' =>true,//open page TRACE


' Tmpl_template_suffix ' = '. TPL ',//change the template file suffix name, default is. html


' Tmpl_file_depr ' = ' _ ',//Modify template file directory hierarchy

/** set up theme templates, dynamically set theme templates
' Default_theme ' + ' your ',//Set Default template theme, your is your own under the TPL established
' Tmpl_detect_theme ' =>true,//auto-detect template Theme
' Theme_list ' + ' your,my ',//list of supported template topics */

' Tmpl_parse_string ' =>array (//Add your own template variable rules
' __css__ ' =>__root__. ' /public/css ',
' __js__ ' =>__root__. ' /public/js ',
),

thinkphp configuration item (vi)

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.