开发者

configure zend framework library path

i want to know where can i p开发者_开发知识库ut the "library" folder in my zend project. Presently i have it in the location of my Zend server. This is my current "library" path:

E:\zend\ZendServer\share\ZendFramework\library

And here is the path to my "app" project:

E:\zend\Apache2\htdocs\app

Inside the "app" project, i have the folders like "public" and "application".

Now how can i integrate the "library" into my "app" project, without referencing it from zendserver?


The easiest way it is to put those library files to the library dir (as in the other answers), but you should consider keeping them separated from the application.

It's easier to have separate git or svn repos for the libraries. Easy to update and maintain for multiple projects at once. Putting them in library will also won't work if you installed the libraries from the bundle, e.g. apt-get install zend-framework-library.

To have the libraries in any directory you want, just add it to the include_path array in the index.php.


Quite often, you'll see a folder called like "lib" or "libraries" in your application (next to public, application, ...).

In that folder, you'll put the frameworks you're using.
For example :

  • public
  • application
  • libs
    • Zend
    • Doctrine
    • ...


To get Zend Framework, just download it, and unpack it to the right folder ;-)

Advantage : you'll be using the version of your choice -- and not the one, possibly outdated, provided by your environment.


And, as a reference, you might want to read the Installing The Zend Framework chapter of the e-book Survive the Deep end.


In your app project u should have a library folder and should contain zend folder in that..so just copy library folder and put it in E:\zend\apache2\htdocs\app.


Please don't tell people to deploy 3rd party libraries to their application project folder, it is bad practice. Deploy your libraries to a path that you have access to, which is outside of your project, and reference it in your include path.

During development, it is fine to have the library in your project, for reference sake, but exclude it in your deploy script and instead have your deploy script either set an environment variable, or have it update your include path.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜