Jump to content

error caused by apostrophes in filename


Dan Holm

Recommended Posts

Hi!

I have the following problem:

I have a php-script which uploads a file from a html-form but when I upload a file containing an apostrophe (') in it´s filename the upload is unsuccessful. A var_dump() on $_FILES get the following output:

 

array(1) { ["file"]=> array(5) { ["name"]=> string(14) "bla´bla.jpg" ["type"]=> string(0) "" ["tmp_name"]=> string(0) "" ["error"]=> int(1) ["size"]=> int(0) } }

 

(spec: charset utf-8, php5.3.0, apache2.2.11)

Link to comment
https://forums.phpfreaks.com/topic/183320-error-caused-by-apostrophes-in-filename/
Share on other sites

Yeah, that was my first thought as well but I don´t see how/where I could escape them. As I understand it the $_FILES variable is set just as the data is sent so I don´t think escaping the string is a possibility. Or am I missing something? Grateful for any advice

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.