Jump to content

Connections


sudsy1970

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/205343-connections/
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/205343-connections/#findComment-1074696
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.