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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.