开发者

How can I connect from one website to database of another website in php

开发者_如何学JAVAHow can I connect from one website to database of another website in php.


The other website will require their port to be open for yours to connect to. They will also need the database user to allow connections that are not just from the local machine.

If you have a fairly standard LAMP set-up, this will mean opening port 3306 on the database server so outside connections can be made, and a database user setting up that will be able to connect from the outside world.

Bear in mind their may be latency issues.


You add the connection details in config.php or where you store them, and another-website.com or the IP to the host url (You probably have localhost there), then the username and the password.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜