Richard Davey wrote:

Hello Axel,

Monday, February 23, 2004, 7:03:38 PM, you wrote:

AIM> Guys, this isn't THAT stupid of a question is it? From my perspective,
AIM> the way PHP seems to see it is that I should already know what kind of
AIM> file I'm looking at. In most cases that's not an unreasonable AIM> assumption. Unfortunately, that's only good for most cases. PHP is rich


Even Windows doesn't *know* what type of file you've got until you
actually try and open it. You could rename a jpg to mp3 and you won't
know about it until Winamp moans at you as you open it.

FTP programs seem to know what kind of file you are transferring. Hence the ability to switch the transfer between AUTO, BINARY and ASCII modes. I usually leave mine in AUTO mode and it seems to figure it out OK. I'd suggest looking at the source to an FTP client to see how they do it. filezilla is opensource:


http://filezilla.sourceforge.net/

Good luck.

Shane

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to