PHP Zendframewor Chapter (1) Application.ini configuration instructions

Source: Internet
Author: User
PHP Zendframewor Chapter (i) Application.ini configuration instructions
; project configuration information; project configuration information to the configuration method. Take the Apache server model as an example: you can define it in the Httpd.conf virtual Host configuration section or in the project. htaccss file.; The specific method is to add a line of instructions: SETENV APPLICATION_ENV product operating environment, such as development environment: SETENV APPLICATION_ENV Development; The. htacess file that is automatically generated when you create a new project using the method used in the previous article is as follows; SETENV application_env Development; Rewriteengine on; Rewritecond%{request_filename}-S [OR]; Rewritecond%{request_filename}-l [OR]; Rewritecond%{request_filename}-D; Rewriterule ^.*$–[nc,l]; Rewriterule ^.*$ index.php [nc,l]; About product operating environment, Application.ini defines three kinds of staging testing development that are on-line status test State development status [production ];p hpsettings The configuration of the runtime environment in PHP, the Ini_set () function of PHP is actually called phpsettings.display_startup_errors = 0phpsettings.display_errors = 0phpsettings.log_errors = 1phpsettings.log_errors_max_len = 1024phpsettings.ignore_repeated_errors = 1phpsettings.date.timezone = "Asia/shanghai" Phpsettings.error_log = Application_path "/". /lib/error/error.log "; Bootstrap boot file configuration Bootstrap.path = Application_path"/bootstrap.php "; bootstrap.class =" Bootstrap "This entry can be omitted, the default is Bootstrap;autoloadernamespaces registration automatically loaded named nullBetween autoloadernamespaces.0 = "db_" autoloadernamespaces.1 = "help_"; Front Controller Configuration resources.frontController.params.displayExceptions = 0resources.frontcontroller.moduledirectory = Application_path "/modules" resources.frontController.moduleControllerDirectoryName = "Controllers" Resources.frontController.defaultModule = "Default"; Layout configuration Resources.layout.layout = "Default" Resources.layout.layoutPath = Application_path "/layouts/default"; View partial configuration, separately configured according to the module (This part is to be initialized in bootstrap) Resources.view.params.default.basePath = Application_path "/modules/default/views/" Resources.view.params.default.layout = "Default" Resources.view.params.default.layoutPath = Application_path "/ Layouts/default "Resources.view.params.admin.basePath = Application_path"/modules/admin/views/" Resources.view.params.admin.layout = "admin" Resources.view.params.admin.layoutPath = Application_path "/layouts/ Admin "; Database configuration (this part to initial database configuration in bootstrap) Resources.db.adapter =" mysqli "resources.db.params.host =" localhost " Resources.db.params.username = "RoOT "Resources.db.params.password =" 123456″resources.db.params.dbname = "dxk" Resources.db.params.charset = "Utf8″; Website on-line environment configuration [staging:production]phpsettings.display_startup_errors = 0phpsettings.display_errors = 0; Test environment configuration [testing: production]phpsettings.display_startup_errors = 1phpsettings.display_errors = 1; Development environment configuration [development:production] Phpsettings.display_startup_errors = 1phpsettings.display_errors = 1resources.frontcontroller.params.displayexceptions = 1
  • 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.