Maison  >  Article  >  développement back-end  >  第一次分享点什么呢,从zf的入口文件开始吧

第一次分享点什么呢,从zf的入口文件开始吧

WBOY
WBOYoriginal
2016-07-25 09:01:461404parcourir
入口文件,public下的index.php文件,向手动创建的就直接粘过去就得了
  1. header("Content-Type: text/html; charset=UTF-8");
  2. error_reporting(E_ALL|E_STRICT);
  3. date_default_timezone_set('Asia/Shanghai');
  4. // Define path to application directory
  5. defined('APPLICATION_PATH')
  6. || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
  7. // Define application environment
  8. defined('APPLICATION_ENV')
  9. || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
  10. // Ensure library/ is on include_path
  11. set_include_path(implode(PATH_SEPARATOR, array(
  12. realpath(APPLICATION_PATH . '/../library'),
  13. get_include_path(),
  14. )));
  15. /** Zend_Application */
  16. require_once 'Zend/Application.php';
  17. // Create application, bootstrap, and run
  18. $application = new Zend_Application(
  19. APPLICATION_ENV,
  20. APPLICATION_PATH . '/configs/application.ini'
  21. );
  22. $application->bootstrap()
  23. ->run();
复制代码


Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn