sudsy1970 Posted June 20, 2010 Share Posted June 20, 2010 hi all, quick question which i hope is easy to answer. I am developing my site with the aid of apache on my pc, when it is working here i will upload it to my hosting site. the daatbase connections will be different so can i write them both into my file, or will this cause an error ? Cheers for a quick answer. Quote Link to comment https://forums.phpfreaks.com/topic/205343-connections/ Share on other sites More sharing options...
hoogie Posted June 20, 2010 Share Posted June 20, 2010 I assume you have one file that you use to connect your database and you just include that file in your other pages when you need to connect? If so, I think it would be easier just to keep separate connect files - one on your development PC at home and one on the live server. It is probably possible to write a conditional statement to change the connection information depending on which server you're on, but I think it would be simpler and less confusing just to have two separate files. Quote Link to comment https://forums.phpfreaks.com/topic/205343-connections/#findComment-1074696 Share on other sites More sharing options...
sudsy1970 Posted June 20, 2010 Author Share Posted June 20, 2010 ok i thought that would be the case. cheers Quote Link to comment https://forums.phpfreaks.com/topic/205343-connections/#findComment-1074701 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.