티스토리 뷰

https://wickedmagic.tistory.com/580

 

[PHP] DB입력시 따옴표(')를 처리하는 addslashes, stripslashes 함수

■ DB입력시 따옴표(')를 처리하는 addslashes, stripslashes 함수 PHP에서 문자열에 따옴표(큰 따옴표 : ", 작은 따옴표 : ')가 들어간 내용을 DB 값으로 집어 넣을때 addslashes, stripslashes 를 사용한다.그런데

wickedmagic.tistory.com

 

 

 

$txtNote1 = htmlspecialchars($txtNote1);
$txtNote2 = htmlspecialchars($txtNote2);

//$txtNote1 = str_replace('\'', '?', $txtNote1);
//$txtNote2 = str_replace('\'', '?', $txtNote2);
// (') 처리
$txtNote1 = addslashes($txtNote1);
$txtNote2 = addslashes($txtNote2);

Total
Today
Yesterday
최근에 올라온 글
«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28