Jump to content
Larry Ullman's Book Forums

Recommended Posts

Hey Larry

I am working hard on my English,I am working hard on my PHP,so i need to use translation tools ,i hope you could understand.

$dbc=mysqli_connect(hostname,username,password,db_name);

DEFINE('DB_HOST','localhost');

I want to replace the 'localhost' domain name

why error,must be localhost? can not be a domain name?

Thanks

Larry

 

 

Link to comment
Share on other sites

The host can be the domain name, it just also needs to be set up in MySQL that way. That being said, what you'd be doing is connected from the computer running PHP to the MySQL installation on your domain name (i.e., from one server to another, across the internet), which is generally a bad idea. 

Link to comment
Share on other sites

 Share

×
×
  • Create New...