Page 1 of 1

$_FILES removes the single quote from file name

Posted: Fri May 12, 2006 6:13 am
by hamdiya
Hey all,

Im working on a file upload script, but when i execute:

Code: Select all

echo $_FILES['file_field]['name'];
the single quote and anything before it does not show up.

Example, if the file name is O'Reily,

Code: Select all

echo $_FILES['file_field]['name'];
returns only Reily

Here is an example of what im using:

Code: Select all

$_FILES['file_field']['name'] = addslashes($_FILES['file_field']['name']);
echo $_FILES['file_field']['name'];
Thanks.

PS: get_magic_quotes_gpc is set to "On" FYI

Posted: Fri May 12, 2006 6:33 am
by jmut
why would you want to do this.
give us more code...and the filename you are trying to get.

Posted: Fri May 12, 2006 8:16 am
by ambivalent

Posted: Fri May 12, 2006 10:12 am
by hamdiya
Hey

ambivalent, that link was helpful, but sry to say did not help me out. Pitty :(

Im keen on getting an answer ASAP, so i posted my question in another forum also. If you want to catch up, here is the link to the topic http://forums.devshed.com/php-developme ... 51260.html

Later