-
Nov 30th, 2012, 03:11 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] php move_uploaded_file without single quotes
I'm trying to move a file to my server and restrict/remove apostrophes from it.
Here's what I have now:
PHP Code:
move_uploaded_file(str_replace("'", "", $_FILES["File"]["tmp_name"]), str_replace("'", "", $target));
The script uploads a file but adds a slash instead if there's a single quote in the file name. I'd just sooner remove them from the filename before uploading the file.
Any ideas?
Thanks.
-
Nov 30th, 2012, 11:23 PM
#2
Re: php move_uploaded_file without single quotes
Check this one and see how the invalid characters are removed: http://phpsense.com/2007/php-file-uploading/
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Dec 2nd, 2012, 05:39 PM
#3
Thread Starter
Fanatic Member
Re: php move_uploaded_file without single quotes
Thank you very much for that link. I couldn't find anything like that. It helped solve my problem.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|