>  기사  >  백엔드 개발  >  第一次分享点什么呢,从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으로 문의하세요.