Re: getcsv error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Looks like Steve posted the answer so here is something related.
I use the function below to deal with those annoying magic quotes setups.

The function will remove the magically annoying quotes from the POST, GET, COOKIE and REQUEST arrays. Simply save it to a file and include it on top of your pages.


<?php
//This is here to deal with MagicQuotes source:
//http://usphp.com/manual/en/security.magicquotes.disabling.php

if (get_magic_quotes_gpc()) {
   function stripslashes_deep($value)
   {
       $value = is_array($value) ?
                   array_map('stripslashes_deep', $value) :
                   stripslashes($value);

       return $value;
   }

   $_POST = array_map('stripslashes_deep', $_POST);
   $_GET = array_map('stripslashes_deep', $_GET);
   $_COOKIE = array_map('stripslashes_deep', $_COOKIE);
   $_REQUEST = array_map('stripslashes_deep', $_REQUEST);

}
?>


--
John
There's room at the top they are telling you still,
But first you must learn how to smile as you kill,
If you want to be like the folks on the hill...
[John Lennon]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux