Yes, this is what I wanted! Thanks very much!
As a follow up question, the buffer now returns the first file in my loop, and I get the text that I want, but fails on the second with the error: Can't call method "read" on an undefined value. However, I have verified that the new filename is correct, so I assume that there must be some problem with reinitializing the dataconn object?
Is there a recommended way to clear a retr() so that a new one can be called? Or is that not even likely to be my problem?
Relevant code is below: The while loop is on a MySQL query return. Note that I haven't done anything with the buffer yet.while (@results = $filequery->fetchrow()) { $filename="/".$filename; print "$filename\n"; $xfr = $ftp->retr($filename); $xfr->read($header,1400); print "$header\n"; }
In reply to Re^2: Read part of a file over FTP
by ronin78
in thread Read part of a file over FTP
by ronin78
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |