I change between localhost and remote host dev: I test it on localhost and then I copy the files to remote in php.
I have one class MYDB which stores the host and user-db info in constants.
How can I declare the constants and write MYDB so that I do not have to switch manually between these two access dates.Instead, I want to switch automatically.
I use:
host: localhost
user: timo
db: localhostdb
pwd: ...
host: remotehostname
user: timo
db: remotehostdb
pwd:..
Before I switch to localhost, I comment the remote host and vice versa. This is not good.
Any idea ?
Timo
About good. Some other approaches