dsv768456 2015-01-22 13:00
浏览 62
已采纳

使用php连接到从localhost到另一台服务器的数据库[关闭]

It's possible to create a mysql connection from localhost to another server using php, if it's possible, how? Thanks!

  • 写回答

4条回答 默认 最新

  • doujianchao7446 2015-01-22 13:03
    关注

    Yes it is possible.You must have the username and password of that domain in which you want to connect.

    mysqli_connect("www.domain.com","username","password","database_name")or die("Error " . mysqli_error());
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?