|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2002-07-06 20:42 UTC] sniper@php.net
  [2002-08-07 01:00 UTC] php-bugs at lists dot php dot net
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 07:00:01 2025 UTC | 
There is a bug with the FTP_ASCII format in the function ftp_fget(). FTP_ASCII seems to be ignored because files downloaded with ftp_fget($stream, $fp, $rf, FTP_ASCII) are in binary format (FTP_BINARY)instead of ascii format. You can verify it with Windows Notepad editor: in binary format, textsfiles show "squares" instead of "end lines". Script example: $list = ftp_nlist($stream, '.'); while(list($k, $v) = each($list)) { $fp = fopen("$directory/$v", 'w'); if (is_resource($fp)) ftp_fget($stream, $fp, $v, FTP_ASCII); fclose($fp); } Does somebody know a solution to force FTP get in ASCII mode? thanks a lot! olivier