Heim  >  Artikel  >  Backend-Entwicklung  >  第一次分享点什么呢,从zf的入口文件开始吧

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

WBOY
WBOYOriginal
2016-07-25 09:01:461404Durchsuche
入口文件,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();
复制代码


Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn