$_FILES removes the single quote from file name

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hamdiya
Forum Newbie
Posts: 3
Joined: Wed May 10, 2006 1:52 pm

$_FILES removes the single quote from file name

Post 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
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

Post by jmut »

why would you want to do this.
give us more code...and the filename you are trying to get.
User avatar
ambivalent
Forum Contributor
Posts: 173
Joined: Thu Apr 14, 2005 8:58 pm
Location: Toronto, ON

Post by ambivalent »

hamdiya
Forum Newbie
Posts: 3
Joined: Wed May 10, 2006 1:52 pm

Post 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
Post Reply