Home >Backend Development >PHP Tutorial >Zend Framework tutorial configuration file application.ini analysis, php.inizend configuration_PHP tutorial
This article analyzes the usage of Zend Framework configuration file application.ini. Share it with everyone for your reference, the details are as follows:
The most convenient and commonly used configuration method is to use configuration files. The specific related setting 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.display_startup_errors = 1 phpSettings.display_errors = 1
includePath related configuration
includePaths.library = APPLICATION_PATH "/../library" includePaths.zend = APPLICATION_PATH "/../../Library"
Location of the boot class
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
Boot class name
bootstrap.class = "Bootstrap"
Default namespace
appnamespace = "Application"
Custom namespace
autoloadernamespaces.app = "App_"
Whether abnormality is displayed
resources.frontController.params.displayExceptions
Configuration of resources
If the application uses a modular approach
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" resources.modules[] =
Custom layout plugin
resources.frontController.plugins.layout = Abc_Controller_Plugin_Layout
layout file directory
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
Default laytou
resources.layout.layout = default
Customized helper path
Copy code The code is as follows: resources.view.helperPath.App_View_Helper = APPLICATION_PATH "/modules/default/views/helpers"
Set up session
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_mysql log.params.host = localhost log.params.port = 3306 log.params.username = root log.params.password = log.params.dbname = test log.params.charset = utf8 log.params.profiler.enabled = true log.params.profiler.class = Zend_Db_Profiler_Firebug
Readers who are interested in more zend-related content can check out the special topics of this site: "Zend FrameWork Framework Introductory Tutorial", "php Excellent Development Framework Summary", "Yii Framework Introduction and Summary of Common Techniques", "ThinkPHP Introductory Tutorial" , "php object-oriented programming introductory tutorial", "php mysql database operation introductory tutorial" and "php common database operation skills summary"
I hope this article will be helpful to everyone in PHP programming.