Problem with apostrophes in file upload
Files with ' in file name breaks the file upload. I get the error message "You don't have permission to access /test/test.php on this server."
Although apostrophes and ampersands are valid in file names on Windows systems, they are not valid file names on the web and should be avoided.
I have tryed to strip those carachters on file upload using the following code on my upload page:
<?php
if(isset($_FILES)) {
foreach($_FILES as $k => $v) {
$_FILES[$k]["name"] = str_replace(array("&","\\","'"),"",$_FILES[$k]["name"]);
}
}
?>
But I still get the same error message.
What am I missing here ?
I'm attaching my upload file.
Regards
Rune