Home > php教程 > PHP开发 > Zend Framework tutorial configuration file application.ini analysis

Zend Framework tutorial configuration file application.ini analysis

高洛峰
Release: 2017-01-05 11:02:28
Original
1557 people have browsed it

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 the configuration file. The specific related setting options of the configuration file are as follows:

The 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
Copy after login

includePath related configuration

includePaths.library = APPLICATION_PATH "/../library"
includePaths.zend = APPLICATION_PATH "/../../Library"
Copy after login

The location of the boot class

bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
Copy after login

Boot class name

bootstrap.class = "Bootstrap"
Copy after login

Default namespace

appnamespace = "Application"
Copy after login

Since Define the namespace

autoloadernamespaces.app = "App_"
Copy after login

Whether to display exception

resources.frontController.params.displayExceptions
Copy after login

Configuration of resources

If the application uses a modular approach

resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.modules[] =
Copy after login

Custom layout plug-in

resources.frontController.plugins.layout = Abc_Controller_Plugin_Layout
Copy after login

layout file directory

resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
Copy after login

Default laytou

resources.layout.layout = default
Copy after login

Customized helper path

resources.view.helperPath.App_View_Helper = APPLICATION_PATH "/modules/default/views/helpers"
Copy after login

Set sessiong

session.lifetime = 3600
Copy after login

Set time

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

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"
Copy after login

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
Copy after login

I hope this article will be helpful to everyone in PHP programming.

For more Zend Framework tutorial configuration file application.ini analysis related articles, please pay attention to the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template