Read one line from the open HTML file (strip tags):
<?php
$file = fopen("test.htm","r");
echo fgetss($file);
fclose($file);
?>
Run Example »
The fgetss() function returns a line from an open file - stripped from HTML and PHP tags.
Note: The fgetss() function is deprecated from 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 |
Return Value: | A single line read from the file on success, FALSE on EOF or error |
---|---|
PHP Version: | 4.0+ |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!