Fixed some syntax in fsockopen() example.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@30531 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Torben Wilson 2000-08-19 20:54:00 +00:00
parent 423a806315
commit 944adca03f

View file

@ -196,13 +196,13 @@ if (!$fp) {
<title>Using UDP connection</title>
<programlisting role="php">
&lt;?php
$fp = fsockopen("udp://127.0.0.1",13, &amp;$errno; &amp;$errstr);
if (!fp) {
echo "ERROR: $errno - $errstr&lt;br&gt;\n";
$fp = fsockopen("udp://127.0.0.1", 13, &amp;$errno, &amp;$errstr);
if (!$fp) {
echo "ERROR: $errno - $errstr&lt;br&gt;\n";
} else {
fwrite($fp,"\n");
echo fread($fp, 26);
fclose($fp);
fwrite($fp,"\n");
echo fread($fp, 26);
fclose($fp);
}
?&gt;
</programlisting>