How to change include directory of Zend Framework

后端 未结 5 2054
后悔当初
后悔当初 2020-12-29 02:04

I get the following error messages:

Warning: include_once(Zend\\Db.php) [function.include-once]: 
failed to open stream: No such file or directory in 
C:\\Ea         


        
5条回答
  •  抹茶落季
    2020-12-29 02:44

    I usually store the framework files under a "library" folder:

    • application
    • public_html
    • library
      • Zend
      • Common
      • etc....

    and then in my bootstrap file, or front controller, I add that "library" folder to the include path:

    set_include_path(get_include_path() . PATH_SEPARATOR . '../library');
    

    See also:

    • Choosing Your Application's Directory Layout.
    • Create the Filesystem Layout.

提交回复
热议问题