Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    May 2004
    Posts
    391
    Thanks
    76
    Thanked 0 Times in 0 Posts

    htaccess file turn off magic quotes one page only

    So I was going to turn off magic quotes for my entire site but I really don't have the time to update the entire site. I actually only need magic quotes on one webform and was wondering if there is something I can write in my htaccess file that turns magic quotes off on only that page.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    You really should update the code, magic_quotes_gpc will be removed as of PHP6, and is an unreliable means to protect you're input data.
    Anyway, using an htaccess and a Files directive:
    Code:
    <Files yourfile.php>
        php_flag magic_quotes_gpc off
    </Files>
    Simple as that.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •