
stream_filter_append 함수는 filter를 추가할 때, 이미 추가된 filter를 덮어 쓸 수 있습니다.
filter를 여러 번 추가할 수 있습니다.
stream_filter_append 함수는 filter를 여러 번 호출하여 filter를 추가할 수 있습니다.
예를 들어, 다음 코드를 살펴보겠습니다.
#hostingforum.kr
php
$fp = fopen('php://memory', 'r+');
stream_filter_append($fp, 'string.toupper');
stream_filter_append($fp, 'string.rot13');
fwrite($fp, 'Hello World!');
rewind($fp);
echo fread($fp, 1024);
이 코드는 'Hello World!'를 대문자로 변환한 후 ROT13 암호화를 적용한 결과를 출력합니다.
stream_filter_append 함수를 여러 번 호출하여 filter를 추가할 수 있으므로, filter를 여러 번 추가하는 것은 가능합니다.
이러한 기능을 사용하여 다양한 filter를 조합하여 사용할 수 있습니다.
2025-08-03 02:56