|
PHP5中文手册
mysqli_real_connectmysqli->real_connect()(PHP 5) mysqli->real_connect() — Opens a connection to a mysql server 说明Procedural style
bool mysqli_real_connect
( mysqli $link
[, string $host
[, string $username
[, string $passwd
[, string $dbname
[, int $port
[, string $socket
[, int $flags
]]]]]]] )
Object oriented style (method) mysqli
bool real_connect
([ string $host
[, string $username
[, string $passwd
[, string $dbname
[, int $port
[, string $socket
[, int $flags
]]]]]]] )
Establish a connection to a MySQL database engine. This function differs from mysqli_connect():
参数
返回值如果成功则返回 TRUE,失败则返回 FALSE。 范例Example#1 Object oriented style
<?php Example#2 Procedural style
<?php 上例将输出:
|