mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
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:
parent
423a806315
commit
944adca03f
1 changed files with 6 additions and 6 deletions
|
@ -196,13 +196,13 @@ if (!$fp) {
|
|||
<title>Using UDP connection</title>
|
||||
<programlisting role="php">
|
||||
<?php
|
||||
$fp = fsockopen("udp://127.0.0.1",13, &$errno; &$errstr);
|
||||
if (!fp) {
|
||||
echo "ERROR: $errno - $errstr<br>\n";
|
||||
$fp = fsockopen("udp://127.0.0.1", 13, &$errno, &$errstr);
|
||||
if (!$fp) {
|
||||
echo "ERROR: $errno - $errstr<br>\n";
|
||||
} else {
|
||||
fwrite($fp,"\n");
|
||||
echo fread($fp, 26);
|
||||
fclose($fp);
|
||||
fwrite($fp,"\n");
|
||||
echo fread($fp, 26);
|
||||
fclose($fp);
|
||||
}
|
||||
?>
|
||||
</programlisting>
|
||||
|
|
Loading…
Reference in a new issue