uploading files with an apostrophe
Posted: Fri Feb 06, 2004 11:45 am
a simple upload script:
but persons are using apostrophes, so i tried
but it did nothing.
the problem is that magic_quotes is adding the slash to the file in the directory and now i can't delete it or open it - i'm a newbie and don't know exactly how this obviously common problem is tackled...
help?
thanks
Code: Select all
...
@copy ($file, "$absolute_path/$file_name") or $endresult = "<font size="2">Couldn't Copy File To Server</font>";Code: Select all
$file_name = strtr($file_name, "'", "");
@copy ($file, "$absolute_path/$file_name") or $endresult = "<font size="2">Couldn't Copy File To Server</font>";the problem is that magic_quotes is adding the slash to the file in the directory and now i can't delete it or open it - i'm a newbie and don't know exactly how this obviously common problem is tackled...
help?
thanks