![]() |
sponsored links |
|
|
sponsored links
|
|
|
5
16th February 15:27
External User
Posts: 1
|
Any way you go about it you're going to have to change the code in your
client's scripts. Even if you were able to change localhost to point to another machine (which you could do in your hosts file but it won't change MySQL's operation), you may muck up other things on the server - localhost is supposed to always point at the local machine, and other apps may depend on it. You're better off placing the hostname in an include file then using it in your code, i.e. hostname.inc.php: <?php $hostname='localhost'; ?> clientpage.php: <?php include('hostname.inc.php'); ... $link = mysql_connect($hostname,...). ... ?> Of course, a better way would be to encapsulate the db link in a PHP class, but that would require more changes to the code. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|