首頁  >  文章  >  後端開發  >  第一次分享點什麼呢,從zf的入口文件開始吧

第一次分享點什麼呢,從zf的入口文件開始吧

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


陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn