
Druckansicht von http://www.php-homepage.de/manual/mysqli.connect.php
mysqli::__constructmysqli_connect(PHP 5) mysqli::__construct -- mysqli_connect — Open a new connection to the MySQL server BeschreibungObjektorientierter Stil
mysqli::__construct()
([ string $host = ini_get("mysqli.default_host")
[, string $username = ini_get("mysqli.default_user")
[, string $passwd = ini_get("mysqli.default_pw")
[, string $dbname = ""
[, int $port = ini_get("mysqli.default_port")
[, string $socket = ini_get("mysqli.default_socket")
]]]]]] )
Prozeduraler Stil
mysqli mysqli_connect
([ string $host = ini_get("mysqli.default_host")
[, string $username = ini_get("mysqli.default_user")
[, string $passwd = ini_get("mysqli.default_pw")
[, string $dbname = ""
[, int $port = ini_get("mysqli.default_port")
[, string $socket = ini_get("mysqli.default_socket")
]]]]]] )
Opens a connection to the MySQL Server running on. Parameter-Liste
RückgabewerteReturns an object which represents the connection to a MySQL Server. Changelog
BeispieleBeispiel #1 mysqli::__construct() example Objektorientierter Stil
<?phpObjektorientierter Stil when extending mysqli class
<?phpProzeduraler Stil
<?phpDie obigen Bespiele erzeugen folgende Ausgabe: Success... MySQL host info: localhost via TCP/IP Anmerkungen
Siehe auch
|