종류 | 설명 |
urlencode() | 문자열을 인코딩 |
urldecode() | URL 인코딩 된 문자열을 디코딩 |
htmlentities() | 적용 가능한 문자들을 HTML 엔티티로 변환 |
rawrulencode() | RFC 3986에 따른 URL 인코딩 |
rawurldecode() | URL 인코딩된 문자열을 디코딩 |
예시)
<?php
echo urlencode("test")."<br />";
echo urlencode("테스트")."<br />";
echo urlencode("http://www.naver.com")."<br />";
echo urlencode("test 테스트 http://www.naver.com")."<br />";
?>
출력)
'LANGUAGE > PHP' 카테고리의 다른 글
[PHP] 에러 메시지 출력 (0) | 2020.03.11 |
---|---|
[PHP] number_format, 숫자 포맷 (0) | 2020.03.04 |
[PHP] timezone 설정 (0) | 2020.02.28 |
[PHP] 날짜함수(date, strtotime, mktime) (0) | 2020.02.28 |
[PHP] print_r(), 변수 정보 출력 (0) | 2020.02.27 |