EXECUTING DIFFERENCE

This is where you share YOUR scripts with others

Moderators: egami, macek, gesf

Post Reply
User avatar
egami
php-forum GURU
php-forum GURU
Posts: 2192
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Thu Dec 16, 2010 8:45 am

include() must first find the file, then read the file, then execute the file, where as putting it in your index.php doesn't require any of those steps.

However, I put my dbconnect.php info in a file that isn't in the root or recursive of the HTTP server/service.

User avatar
egami
php-forum GURU
php-forum GURU
Posts: 2192
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Fri Dec 17, 2010 8:01 am

for security reasons, primarily, putting the db credentials in a different file, not accessible to the world via HTTP services.

Post Reply