T
Tim
Guest
My server will not let me add a .htaccess file or edit the php.ini file to get around the magic quotes set to on problem.
Am I up the proverbial creek or is there any other way I can get round this problem? I read that I could add the script below to php files so that it wouldn't matter if magic quotes were on or off. Would this work and if so, which php files should I add it to?
Thanks
<?php
highlight_string ( "<?php
function myAddSlashes( $string ) {
if (get_magic_quotes_gpc()==1) {
return ( $string );
} else {
return ( addslashes ( $string ) );
}
}
?>" );
?>
Am I up the proverbial creek or is there any other way I can get round this problem? I read that I could add the script below to php files so that it wouldn't matter if magic quotes were on or off. Would this work and if so, which php files should I add it to?
Thanks
<?php
highlight_string ( "<?php
function myAddSlashes( $string ) {
if (get_magic_quotes_gpc()==1) {
return ( $string );
} else {
return ( addslashes ( $string ) );
}
}
?>" );
?>