Another thing is good with using
subdirectory, folder, 'includes'
This is where you have index:
/includes/ (= folder)
index.php
mypage2.php
mypage3.php
.htaccess
.htaccess tells apache server who can access files, index.php ....
contents of .htaccess
Allow from All
now 'includes' subfolder can have its own .htaccess file
with this contents, to protect you data ...
.htaccess in 'includes'
Deny from All
means nobody can directly access you files, but PHP still can use those
includes files: like 'my_minidb.class.php'
STRUCTURE:
/images/
..... image1.jpg
..... image2.jpg
/includes/
.... .htaccess (Deny from All)
..... my_minidb.class.php
..... config.php
.htaccess (Allow from All)
index.php
mypage1.php
mypage2.php