简体   繁体   中英

Zend Framework and the location of the zend library

I am currently working on several zend projects, and the approach I took initially was to dump the Zend framework into Wamp Servers root directory (wamp/www). I then used the zf tool to CREATE PROJECT (multiple times) into a folder called Projects_Zend which is also in Wamp's root.

I then copied and pasted the entire Zend framework into each of my projects library folder, where I set the appropriate paths for each project.

QUESTION:

Is this a good approach, as I now have multiple duplicate copies of the zend framework, one for each of my projects.

QUESTION TWO:

How to avoid this??

Any help/advice welcome....

Well, if all the websites will always be on the same server this is good reason to have only one copy of ZF. But keep in mind if one project uses something that gets broken/removed/whatever in a future upgrade you could find it difficult to manage.

This question is very situation dependent. Both solutions can be right.

Personaly I always have a copy of zf in a projects folder since it's not like its a ton of space lost and my projects tend to be on seperate servers.

Hope this helps!

About question 2: you don't have to avoid anything. Just do whatever is right for your context. If you want a more precise answer I guess you should give us more information about the relation between all these projects/websites.

About "Does the location of the zend library even matter? ": well as long as its out of the public directory to avoid peoples invoking script files no it does not mater much.

you can either put zend library on the php include_path or in your case using symlinks maybe better. but there's no harm in putting it in a library folder inside of each project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM