ananaz Posted January 22, 2011 Share Posted January 22, 2011 What is the most secure way? Having DB connect script in the beginning of every script you need db for, or Having a database.php script containing the script and then including it to all other php. Quote Link to comment https://forums.phpfreaks.com/topic/225347-separate-db-file-or-intern/ Share on other sites More sharing options...
Zurev Posted January 22, 2011 Share Posted January 22, 2011 Most secure? I think you mean most efficient? Throw the connection in a database.php script and include it. Either way that database connection code is getting interpreted, there won't be a difference in efficiency, not a noticeable one anyway. Quote Link to comment https://forums.phpfreaks.com/topic/225347-separate-db-file-or-intern/#findComment-1163738 Share on other sites More sharing options...
ananaz Posted January 22, 2011 Author Share Posted January 22, 2011 I mean if it will be easier for hackers to sql inject a file holding the mysql connections by somehow include it in scam or spam php. Quote Link to comment https://forums.phpfreaks.com/topic/225347-separate-db-file-or-intern/#findComment-1163753 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.