jackmalanweb Posted December 3, 2016 Share Posted December 3, 2016 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 More sharing options...
Larry Posted December 5, 2016 Share Posted December 5, 2016 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 More sharing options...
Recommended Posts