Zend Framework Tutorial configuration file Application.ini parsing _php instance

Source: Internet
Author: User
Tags zend framework
This article analyzes the Zend Framework configuration file Application.ini usage. Share to everyone for your reference, as follows:

The most convenient and commonly used configuration method is to use the configuration file. The specific setting options for the configuration file are as follows:

PHP.ini the relevant configuration options, in the following format:

Phpsettings. Configuration options, such as

phpsettings.display_startup_errors = 1phpsettings.display_errors = 1

Includepath Related Configurations

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"

Custom namespaces

Whether to show exceptions

Configuration of resources

If your app uses a modular approach

Custom Layout plug-ins

Resources.frontController.plugins.layout = Abc_controller_plugin_layout

File directory for layout

Resources.layout.layoutPath = Application_path "/layouts/scripts"

The default Laytou

Resources.layout.layout = Default

Customizing the helper Path
Copy the Code code as follows: Resources.view.helperPath.App_View_Helper = Application_path "/modules/default/views/helpers"

Set Sessiong

Session.lifetime = 3600

Set the time

Datetime.timezone = "Asia/shanghai" datetime.format.date = "m-d-y" datetime.format.datetime = "M-d-y h:i:s"

Configuration of the database

Db.adapter = "Pdo_mysql" Db.prefix = "pre_" db.host = "localhost" db.port = "3306" db.dbname = "db" db.username = "root" db.pass Word = "" Db.charset = "UTF8"

Configuration of the Log

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

More interested in Zend related content readers can view the topic: "Zend framework of the introductory tutorial", "PHP Excellent Development Framework Summary", "Yii framework Introduction and common skills Summary", "thinkphp Introductory Tutorial", "PHP object-oriented Programming introduction tutorial "," Introduction to Php+mysql Database Operation "and" PHP common database Operation Skills Summary "

I hope this article is helpful to you in PHP programming.

  • Related Article

    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.