Parsing the configuration file application. ini in the ZendFramework tutorial

Source: Internet
Author: User
This article analyzes the usage of the ZendFramework configuration file application. ini. For your reference, refer to the following: the most convenient and commonly used configuration methods use configuration files. The specific configuration options of the configuration file are as follows: related configuration options of php. ini, the specific format is as follows: phpSettings. configuration options, such as phpSettings. dis

This article analyzes the usage of the Zend Framework configuration file application. ini. For your reference, refer to the following: the most convenient and commonly used configuration methods use configuration files. The specific configuration options of the configuration file are as follows: related configuration options of php. ini, the specific format is as follows: phpSettings. configuration options, such as phpSettings. dis

This article analyzes the usage of the Zend Framework configuration file application. ini. We will share this with you for your reference. The details are as follows:

The most convenient way to use the configuration file. The Configuration File Settings are as follows:

The configuration options of php. ini are as follows:

PhpSettings. configuration options, such

phpSettings.display_startup_errors = 1phpSettings.display_errors = 1

Deployment depath Configuration

includePaths.library = APPLICATION_PATH "/../library"includePaths.zend = APPLICATION_PATH "/../../Library"

Position of the bootstrap class

bootstrap.path = APPLICATION_PATH "/Bootstrap.php"

Bootstrap Class Name

bootstrap.class = "Bootstrap"

Default namespace

appnamespace = "Application"

Custom namespace

autoloadernamespaces.app = "App_" 

Display exception?

resources.frontController.params.displayExceptions 

Resource Configuration

If the application is modular

resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"resources.modules[] = 

Custom Layout plug-in

resources.frontController.plugins.layout = Abc_Controller_Plugin_Layout

Layout file directory

resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"

Default laytou

resources.layout.layout = default

Customize the helper path

The Code is as follows:

Resources. view. helperPath. App_View_Helper = APPLICATION_PATH "/modules/default/views/helpers"

Set sessiong

session.lifetime = 3600

Set Time

datetime.timezone = "Asia/Shanghai"datetime.format.date = "m-d-Y"datetime.format.datetime = "m-d-Y H:i:s"

Database Configuration

db.adapter = "pdo_mysql"db.prefix = "pre_"db.host = "localhost"db.port = "3306"db.dbname = "db"db.username = "root"db.password = ""db.charset = "utf8"

Log Configuration

log.adapter          = pdo_mysqllog.params.host        = localhostlog.params.port        = 3306log.params.username      = rootlog.params.password      = log.params.dbname       = testlog.params.charset       = utf8log.params.profiler.enabled  = truelog.params.profiler.class   = Zend_Db_Profiler_Firebug

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.