Example Analysis of Zend Framework configuration File application.ini
Xiaobian to share with you the Zend Framework configuration file application.ini sample analysis, I hope you have something to gain after reading this article, let's discuss it together!
The details are as follows:
The most convenient and commonly used configuration method uses configuration files. The specific relevant setting options of the configuration file are as follows:
The configuration options associated with php.ini are in the following format:
phpSettings. Configuration options, such as
phpSettings.display_startup_errors = 1phpSettings.display_errors = 1
includePath related configuration
includePaths.library = APPLICATION_PATH "/../ library"includePaths.zend = APPLICATION_PATH "/../../ Library"
Location of boot classes
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
the allocation of resources
If the application uses a modular approach
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"resources.modules[] =
Custom Layout Plugins
resources.frontController.plugins.layout = Abc_Controller_Plugin_Layout
layout file directory
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
Default laytou
resources.layout.layout = default
Custom helper path
The copy code is as follows:
resources.view.helperPath.App_View_Helper = APPLICATION_PATH "/modules/default/views/helpers"
Set sessiong
session.lifetime = 3600
setup 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 After reading this article, I believe you have a certain understanding of "Zend Framework configuration file application.ini sample analysis", if you want to know more related knowledge, welcome to pay attention to the industry information channel, thank you for reading!