I have done quite a bit of searching for the folder structure for my new Smarty Framework. I want to set it up right, so I don't get a whole bunch of programming done, and find out that there is a different way I should have done it for security purposes and, for a lesser reason, application purposes. I have seen several different ways to structure Smarty Frameworks. Is there any significant advantages of setting up the directories one way or another. Can I set up my site with the standard "out of the box" Smarty format?

I have found a way to protect the templates with HTACCESS If I set it up this way, should there be a problem? Can virus search on templates/ or templates_c/ to find Smarty Sites to hack? Should I put my plugins that I create in the /libs/plugins or create another directory --plugins/ I believe it has been done both ways, is there an advantage? Also, Functions that I produce to create my plugins, can I put them into the libs/internals? I think it has been suggested to create another folder, possibly --includes/ and put them there.

I also want to create large applications ie) galleries, memberships, mailers, shopping carts, my backend, etc. Is it smart to create a folder of php or each appl and include it into the index.php under the doc root,( or other php pages under the doc root), then pull them through templates to get the apps implanted into pages one click away from the home page or on the home page._________________Success to all!

Best practice is to keep the files, where possible, outside the public folder. .htaccess works - but a mis-configuration or don't escape your input strings and you leave yourself open.

If it needs to be directly served up to the user - such as an image, css, etc then it should live under the public folder. Otherwise keep higher up and out of direct access._________________General Blog: http://dasher.wordpress.com
VoIP & SIP: http://blog.sipx.ws

Thanks for that link to file structure. It was very helpful! Correct me if I am wrong, but in your suggested posting, it looks like the guy is creating an application in a folder www.mysite.com/html/

I want my surfers to log into my Smarty home page of www.mysite.com I do not see any other way but to set up the files as I have suggested above and I do not see any examples anywhere that can create Smarty folders outside the webroot, but still have the home page Smarty. Am I correct?_________________Success to all!

The folder structure of many webhosts have the actual HTML folder under the domain name - but this is never seen by the users - who would reach the site via: http://www.theHost.com - the actual folder that the pages are served is via a vhosts (with Apache) section which points to /www.theHost.com/html.

It's done this way because often you need to store information that shouldn't be acessible to end users somewhere (such as config information which may contain username & passwords).