Re: note 27803 added to function.fopen
| From: | Jesus M. Castagnetto | Date: | Thu, 19 Dec 2002 09:23:49 +0000 |
| Subject: | Re: note 27803 added to function.fopen | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-41106@lists.php.net to get a copy of this message | ||
Bug reports belong in bugs.php.net, as clearly
indicated more than once in the prelude to the form
that you filled to submit this note. It will be
removed now.
--- digitalife@163.com wrote:
> i found a bug in fopen() the FTP://URL file
>
> this is my test program:
>
> <?php
>
> print("<H1>FTP</H>\n");
>
> print("<HR>\n");
>
> //open a file using ftp protocol
>
> if (! ($myFile =
>
@fopen("ftp://usrername:password@10.10.6.2/AUTOPT.PRG","r")))
> {
> print("file could not be opened");
>
> exit;
> }
>
> /* Note: we know ,in win32, the
> ftp://username:password@url/filename can be
> recognised correct, with function fopen(),can return
> a ftp file's handle
> */
>
> while (! feof($myFile))
> {
> // read a line from the file
> $myLine = fgetss($myFile,255);
> print("$myLine<br>\n");
> }
>
> // close the file
>
> @fclose($myFile);
>
> /* Note: but in while loop sentence,the statement
> did not run,why,becoz the $myFile already pointed to
> the end of file when it's open.
> */
>
> ?>
> --
> http://www.php.net/manual/en/function.fopen.php
>
http://master.php.net/manage/user-notes.php?action=edit+27803
>
http://master.php.net/manage/user-notes.php?action=delete+27803
>
http://master.php.net/manage/user-notes.php?action=reject+27803
>
>
> --
> PHP Notes Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
=====
--- Jesus M. Castagnetto <jmcastagnetto@php.net>
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com