Home » , » Turn off magic_quotes_gpc on shared or free hosts

Turn off magic_quotes_gpc on shared or free hosts

magic quotes gpc

Last days i wanted to post some seo articles and this problem was a bit confusing to me.
I was searching and searching on the sources of my site and was not able to find the problem until i figured it out.
I tried .htaccess or php ini_set but had no luck.
And i came out using a php function called stripslashes.

Turn magic quotes off example



<?php
// get something
$q = $_GET['q'];
// print it out
echo stripslashes($q);
?>

It was a short tip yes, but it may help you in some situations
And dont forget to share :D

0 תגובות:

Post a Comment

Follow by Email