Results 1 to 3 of 3

Thread: [RESOLVED] php move_uploaded_file without single quotes

  1. #1
    Fanatic Member
    Join Date
    Mar 08
    Posts
    742

    Resolved [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.

  2. #2
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 08
    Location
    Trivandrum, Kerala, India
    Posts
    7,557

    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 Athlon X2 5200+, ASUS Motherboard, 2 GB RAM, 400 GB HDD, Nvidia 8600 GT 512MB, 19.5" TFT(Wide), Creative 5.1 Home Theater

    Social Group: VBForums - Developers from India

    Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...

  3. #3
    Fanatic Member
    Join Date
    Mar 08
    Posts
    742

    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
  •