dsdsdsdsd Posted March 4, 2008 Share Posted March 4, 2008 hello; I have installed php on my personal computer ( winxp with apache ); so now all of my scripts will have two lives: one internet-based webserver life/domain AND a new local-machine-based life/domain; consequently, my method calls such as mysql_connect(...) will need to either be hardcoded to identify the running environment ( for testing locally or for running live ) OR they can dynamically determine their environment and take appropriate actions; I am aware of the $_SERVER array, but I understand that it is not necessarily consistent with the info it offers; maybe one of the $_SERVER properties such as SERVER_NAME or HTTP_HOST is an acceptable property(??) any thoughts; thanks dsdsdsdsd Quote Link to comment Share on other sites More sharing options...
Stooney Posted March 4, 2008 Share Posted March 4, 2008 I think it's best you include a file from above the webroot that makes your database connection. Your live and local server will each have it's own version of this. Quote Link to comment Share on other sites More sharing options...
dsdsdsdsd Posted March 4, 2008 Author Share Posted March 4, 2008 Chris, thanks; dsdsdsdsd Quote Link to comment 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.