PHP fgetss() 함수
❮ PHP 파일 시스템 참조예시
열려 있는 HTML 파일(스트립 태그)에서 한 줄 읽기:
<?php
$file = fopen("test.htm","r");
echo fgetss($file);
fclose($file);
?>
정의 및 사용
fgetss() 함수는 HTML 및 PHP 태그에서 제거된 열린 파일에서 한 줄을 반환합니다.
참고: fgetss() 함수는 PHP 7.3부터 더 이상 사용되지 않습니다.
통사론
fgetss(file, length, tags)
매개변수 값
Parameter | Description |
---|---|
file | Required. Specifies the open file to return a line from |
length | Optional. Specifies the number of bytes to read. Reading stops when length-1 bytes have been reached, or a when a new line occurs, or on EOF. Note: This parameter is required in versions prior to PHP 5 |
tags | Optional. Specifies which tags that will not be removed |
기술적 세부 사항
반환 값: | 성공 시 파일에서 한 줄 읽기, EOF 또는 오류 시 FALSE |
---|---|
PHP 버전: | 4.0+ |
❮ PHP 파일 시스템 참조