Welcome Guest, Not a member yet? Register   Sign In
Double quotes in file name
#1

[eluser]Unknown[/eluser]
I upload an image with the filename like this: 9'' GW Shadow DLX 2. And I use the resize function to create thumbnails but I get this error:

The path to the image is not correct.

Image processing failed. Please verify that your server supports the chosen protocol and that the path to your image library is correct.


Why the double quotes is a problem here ?

Any help please.

Sorry for my english.

#2

[eluser]CroNiX[/eluser]
Try loading an image (or any other file) using doublequotes around the filename (which is a string), where the filename has a double quote in it. Do you see why it wouldn't work?

"9" GW Shadow DLX 2"

PHP would see this as "9" and then error out on GW
#3

[eluser]Unknown[/eluser]
I already fix the problem.

I used this code for remove the double quotes.
Code:
$_FILES['file'.$i]['name']     = str_replace("\'\'", '"', $_FILES['file'.$i]['name']);

I open for more suggestion.

Thank you Smile






Theme © iAndrew 2016 - Forum software by © MyBB