Wednesday, July 29, 2009

placing include files

users can easily access files that are in the document root. so, it is safe to place configuration and log files outside of the document roots. and you can use those file by using include/require or better to use include_once/require_once.Lets see zend mock questions regarding this.

Question:

Where should indirectly executed PHP scripts (i.e. include files) be stored in the file system?

Answer:

1. Outside of the Document Root
2. In the document root
3. Anywhere you want
4. In the database
See the book OpenCart 1.4 Template Design Cookbook.
See the book Joomla Mobile Development Beginners Guide

2 comments:

hlegius said...

why not "outside document root" ? Is more secure because you do not access them by browser directly !

tahsin said...

thanks hlegius.

I have updated the post.keep suggesting.