[RESOLVED] php move_uploaded_file without single quotes-VBForums
Results 1 to 3 of 3

Thread: [RESOLVED] php move_uploaded_file without single quotes

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    763

    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 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,573

    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, VB6, Photoshop...

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    763

    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
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.