Alk3m1st Posted July 5, 2009 Share Posted July 5, 2009 I have a MYSQL connection n include file (which has been renamed to some_file.inc.php - to protect from browser output). However, I fear that it is still possible (with a spider app like HTTrack) to download my include file and therefore read my mysql_connect and mysql_select_db username:password etc. Thus giving someone access to my database. What ways are there that I can somehow hide, or prevent access to this file? Or should I be looking at a different method entirely? Many Thanks. Alk Link to comment https://forums.phpfreaks.com/topic/164846-protecting-mysql_connect-and-mysql_select_db-functions/ Share on other sites More sharing options...
haku Posted July 5, 2009 Share Posted July 5, 2009 Store your constants in a file outside your document root (for example, if your document root is public_html, store it in the same folder that public_html is contained in), and then link to it relatively (../db_constants.php for example). Link to comment https://forums.phpfreaks.com/topic/164846-protecting-mysql_connect-and-mysql_select_db-functions/#findComment-869235 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.