Reply to Re: how do I tell a browser the name of a file, for download, if the file has open space in its name?

Your name:

Reply:


Posted by Anonymous on 10/20/07 14:33

lawrence k wrote:
>
> I've got a music studio for a client. Their whole studio is run with
> Macintosh computers. Macintosh computers allow file names to have open
> white spaces, such as "animal hospital.mp3".

> This works fine except when it encounters a file with an open space in
> it, and the studio has several thousand mp3s which have open spaces in
> their name.
>
> If a file has an open space, the above code seems to truncate the file
> name at the first open white space. Instead of "animal hospital.mp3",
> the browser starts to download "animal", with no file extension. And
> the download fails - instead of 6 megabytes, only 1 kilobyte
> downloads.
>
> Any insights?

A space is %20, IIRC. Try rawurlencode() instead of urlencode().

Bye!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация