数据库联接如何写

WBOY
Release: 2016-06-13 10:00:30
Original
858 people have browsed it

数据库联接怎么写?
Mysql的数据库默认连接端口3306,现在服务器上的端口被修改为3308了,要怎么修改那个数据库联接里面的$server啊?
谢谢

------解决方案--------------------
一般是这样
$server = "localhost:3308 ";
------解决方案--------------------
你用MYSQL还是MYSQLI接口:
MYSQL:
localhost:3308
MYSQLI:
localhost, '3308 '
------解决方案--------------------
localhost:3308

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template