Directory structure of Zend framework and MVC on a shared hosting?
Ive just completed a small site with ZF in MVC pattern on my localhost and am now wondering what would be the most suitable way of structuring the开发者_运维问答 directories.. I've read somewhere that it's best to have "application", "library" folders in a same folder one level above the "www" directory and set the include_path in the index.php file..so that all the core files are inaccessible from intruders or whatnot..? I run multiple sites on one shared hosting so what would be the best directory structure that is most organized and maintainable?
Any suggestions and comments are greatly appreciated! Thanks
there is one rule: you should not put anything besides /public (/htdocs or other named - dir, where your index.php situated)directory of zf into your doucument_root.
But I think for shared hosting you cannot decide where is your document_root located, so you can just use .htacces file to deny any non-public files from all.
structure for example:
/htdocs /application /config /library /Zend /(other libraries) /user /controller /model /view /variable /sessions /cache /view_compiles .htaccess (deny from all) /images /scripts /styles index.php
精彩评论