Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- Perfect Database Connection


andrewsmd - 10:12 pm on Jul 28, 2009 (gmt 0)


A big benefit to storing your db connection info in a outside file is for changes later on. Say you make a site with 100 pages and you put the connection information in every page, then you migrate to a new database. Now you have to go change it in every single page, where if you store it in one file you can just change it there and viola! For the production issue jatar_k mentioned, since you already have the if statements in there, just redirect to a default error page.

On a different note, I'm surprised you did classic asp but couldn't handle the move to .net. Coming from someone who has done both, php is a lot more coding intensive than .net. Asp.net has all of the fancy gui based interfaces to code with. I personally like PHP better, but that is because I fell more in control because of the coding requirements.


Thread source:: http://www.webmasterworld.com/php/3961035.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com