I'm creating a weather module for an application that uses weather.com's xml service. With the license from weather.com you get a couple folders of images to use with their xml service. Is there an easy or better way to store the images in the module itself rather than the public folder of the app?
A:
Since the public folder is (or, really should be) the document root of your web server, you need to put it there. The choices are:
- put the images in your module, open up your folders to the outside, making the module folder accessible (bad idea)
- put the images in your module, read them and output them upon request (weird idea)
- put the images in the public folder
If you put the images in something like /public/images/weater_com/* I think you still got a pretty portable/namespaced location of your images.
chelmertz
2010-08-07 20:34:58
A:
I Personaly have created a folder modules in the public folder like this: www/htdocs/meo/public/modules
For each module i create a folder in modules folder.
/srv/www/htdocs/meo/public/modules/RandImageFrontPage/
In that folder i create 3 folders: css,img,js
I find this is more the MVC way
streetparade
2010-08-07 20:54:44
That's a nice way of keeping things organised but it really has nothing to do with mvc :)
chelmertz
2010-08-08 07:37:24