Reply to Re: [PHP] uploading files with a single quote in the filename

Your name:

Reply:


Posted by Jochem Maas on 02/24/05 02:56

neil@jansons.net wrote:
> Thanks
>
> some answers:
> turning magic quotes on and off seemed to make no difference
> 1. single quotes aren't important to me but this application allows users to
> upload photos which often use descriptive filenames which sometimes have
> single quotes eg. "my mum's car.jpg". I replace the spaces with underscores
> but I can't get to the filename before the single quote and the text before
> it have been stripped.
> 2. the original filename is only important insofar as it often has
> descriptive information in it.
> 3. I can't really answer this question very well except to say that it
> happens in my development environment (IE6 on win2k with apache on win2k) as
> well as on my hosting server (IE6 on win2k and apache on linux).

you're a webdeveloper. please install firefox :-)

>
> "Jochem Maas" <jochem@iamjochem.com> wrote in message
> news:421C7E1A.1050605@iamjochem.com...
> neil@jansons.net wrote:
>
>>Hi
>>When uploading files using a type=file in a form, if a file is uploaded
>
> with
>
>>a single quote the file gets truncated to whatever is after the quote
>>eg.
>>blah'sblah.txt
>>
>>will be uploaded as
>>sblah.txt
>>
>>Is this a magic quotes issue?
>
>
> I don't think so, test it by turning it on/off.
>
>
>>What is the best way to deal with it?
>
>
> couple of questions:
>
> 1. are single quotes really necessary in filenames?
> 2. is the original filename really that important to you?
> 3. does this happen on just one browser/[client]platform? it could be
> a browser bug (i.e. it gets stripped on the clientside which would means
> thats
> its nothing to do with a PHP bug/setting/feature/misunderstanding/etc)
>
>
>>Neil
>>
>
>

[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

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