reference/mysqli/mysqli/get-host-info.xml
fc16f84d9479ff91c2191225b2b0c4df657e23b4
...
...
@@ -10,15 +10,15 @@
10
10
<refsect1 role="description">
11
11
&reftitle.description;
12
12
<para>&style.oop;</para>
13
-
<fieldsynopsis><type>string</type><varname linkend="mysqli.get-host-info">mysqli->host_info</varname></fieldsynopsis>
13
+
<fieldsynopsis><type>string</type><varname linkend="mysqli.get-host-info">mysqli-&gt;host_info</varname></fieldsynopsis>
14
14
<para>&style.procedural;</para>
15
15
<methodsynopsis>
16
16
<type>string</type><methodname>mysqli_get_host_info</methodname>
17
-
<methodparam><type>mysqli</type><parameter>link</parameter></methodparam>
17
+
<methodparam><type>mysqli</type><parameter>mysql</parameter></methodparam>
18
18
</methodsynopsis>
19
19
<para>
20
20
Returns a string describing the connection represented by
21
-
the <parameter>link</parameter> parameter (including
21
+
the <parameter>mysql</parameter> parameter (including
22
22
the server host name).
23
23
</para>
24
24
</refsect1>
...
...
@@ -42,45 +42,29 @@
42
42
<refsect1 role="examples">
43
43
&reftitle.examples;
44
44
<example>
45
-
<title><varname>$mysqli->host_info</varname> example</title>
45
+
<title><varname>$mysqli-&gt;host_info</varname> example</title>
46
46
<para>&style.oop;</para>
47
47
<programlisting role="php">
48
48
<![CDATA[
49
49
<?php
50
-
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
51
50

52
-
/* check connection */
53
-
if (mysqli_connect_errno()) {
54
-
printf("Connect failed: %s\n", mysqli_connect_error());
55
-
exit();
56
-
}
51
+
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
52
+
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
57
53

58
54
/* print host information */
59
55
printf("Host info: %s\n", $mysqli->host_info);
60
-

61
-
/* close connection */
62
-
$mysqli->close();
63
-
?>
64
56
]]>
65
57
</programlisting>
66
58
<para>&style.procedural;</para>
67
59
<programlisting role="php">
68
60
<![CDATA[
69
61
<?php
70
-
$link = mysqli_connect("localhost", "my_user", "my_password", "world");
71
62

72
-
/* check connection */
73
-
if (mysqli_connect_errno()) {
74
-
printf("Connect failed: %s\n", mysqli_connect_error());
75
-
exit();
76
-
}
63
+
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
64
+
$link = mysqli_connect("localhost", "my_user", "my_password", "world");
77
65

78
66
/* print host information */
79
67
printf("Host info: %s\n", mysqli_get_host_info($link));
80
-

81
-
/* close connection */
82
-
mysqli_close($link);
83
-
?>
84
68
]]>
85
69
</programlisting>
86
70
&examples.outputs;
...
...
@@ -102,7 +86,6 @@ Host info: Localhost via UNIX socket
102
86
</refsect1>
103
87

104
88
</refentry>
105
-

106
89
<!-- Keep this comment at the end of the file
107
90
Local variables:
108
91
mode: sgml
109
92