Can't you do like
php_flag magic_quotes_gpc on
in htaccess?
Quote:
|
Originally Posted by calmlikeabomb
However, you shouldn't ever assume it's gonna be enabled on every machine. I'll share two functions that I use to escape quotes in data:
PHP Code:
if(!function_exists('my_stripslashes')) { function my_stripslashes($str) { if (!get_magic_quotes_gpc()) { return stripslashes($str); } else { return $str; }}}
if(!function_exists('my_addslashes')) { function my_addslashes($str) { if (!get_magic_quotes_gpc()) { return addslashes($str); } else { return $str; }}}
|