Home  >  Article  >  php教程  >  Zend Framework tutorial configuration file application.ini analysis

Zend Framework tutorial configuration file application.ini analysis

高洛峰
高洛峰Original
2017-01-05 11:02:281530browse

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

includePath related configuration

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

The location of the boot class

bootstrap.path = APPLICATION_PATH "/Bootstrap.php"

Boot class name

bootstrap.class = "Bootstrap"

Default namespace

appnamespace = "Application"

Since Define the namespace

autoloadernamespaces.app = "App_"

Whether to display exception

resources.frontController.params.displayExceptions

Configuration of resources

If the application uses a modular approach

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

Customized helper path

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_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

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!

Statement:
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