Results 1 to 2 of 2

Thread: Why does php add backslashes to special chars?

  1. #1

    Thread Starter
    Frenzied Member Jmacp's Avatar
    Join Date
    Jul 2003
    Location
    UK
    Posts
    1,959

    Why does php add backslashes to special chars?

    So if i posted some special chars through html to a php script like,
    '@'#
    and echo it out i get an output of
    \'@\'#
    What do i need to change in php.ini or what code can i add to the php to stop this?

    I have php ver 5.2.8.

  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: Why does php add backslashes to special chars?

    you could use stripslashes(), but magic_quotes_gpc is the directive you're looking for in the configuration file.

Posting Permissions

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



Click Here to Expand Forum to Full Width