if ( !get_magic_quotes_gpc() ) {
 #$comment = stripslashes($comment);
 #$subject = stripslashes($subject);
} else {
 $comment = stripslashes($comment);
 $subject = stripslashes($subject);
}


if ( ! get_magic_quotes_gpc() ) {
 $comment = addslashes($comment);
 $subject = addslashes($subject);
} else {
}






================================

http://man.phpschool.com/manual/en/function.get-magic-quotes-gpc.php



<?php
if (get_magic_quotes_gpc
()) {
   function
maybeaddslashes(&$inthing
) { }
   function
maybestripslashes(&$inthing
) {
       if (
is_array($inthing
)) {
           foreach (
$inthing as $element
) {
              
$element = stripslashes($element
);
           }
       } else {
          
$inthing = stripslashes($inthing
);
       }
   }
} else {
   function
maybeaddslashes(&$inthing
) {
       if (
is_array($inthing
)) {
           foreach (
$inthing as $element
) {
              
$element = addslashes($element
);
           }
       } else {
          
$inthing = addslashes($inthing
);
       }
   }
   function
maybestripslashes(&$inthing
) {}
}
?>


'인터넷관련' 카테고리의 다른 글

파일업로드 삭제 클래스  (0) 2008.01.18
디렉토리..class.sh_dir_cls.inc  (0) 2008.01.18
session_save_path() 2  (0) 2008.01.18
table_sql 을 엑셀파일로 다운받기.  (0) 2008.01.18
Error Page Code  (0) 2008.01.18
호스팅 받는 업체들 용량체크하는법  (0) 2008.01.18
mysql query 관련 class  (0) 2008.01.18
파일네임 금지  (0) 2008.01.18
Posted by 알 수 없는 사용자
,