-1

If i upload file with single quotes that will cause empty name when i do print_r to $_FILE. for example, file named 2'.ogg that system would output .ogg. I think that windows causes this, but i'm not sure. here the code i'm using:

<?php
if(isset($_POST['submit'])) { 
   print_r($_FILES); 
}
echo <<<Print
<form action='' method="POST" enctype="multipart/form-data">
<input type="file" name="t[]"> <input type="submit" name="submit">
</form>
Print;
?>
user3063602
  • 49
  • 1
  • 1
  • 7

1 Answers1

0

Use addslashes() to escape single quote and stripcslashes() to remove added slashes.

Sagar
  • 642
  • 3
  • 14