MYSQLI
连接数据库
< ?php
$mysqli = new mysqli(“localhost”, “root”, “secret”, “test”);
if (mysqli_connect_errno( )) {
printf(“Connect failed: %s\n”, mysqli_connect_error( ));
exit ( );
} else {
printf(“Connect succeeded\n”);
}
?>
错误检查
1) Read the rest of this entry »