Read a single line from the open HTML file, removing HTML tags.
<?php $file = fopen(“test.htm”,“r”); echo fgetss($file); fclose($file); ?> |
The fgetss() function returns a line from an open file, with HTML and PHP tags removed.
The fgetss() function has been deprecated as of PHP 7.3. |
fgetss(file, length, tags) |
Parameter |
Description |
file |
Mandatory. Specifies the open file from which to read a line. |
length |
Optional. Specifies the number of bytes to read. Reading stops when |
tags |
Optional. Specifies which tags should not be removed. |
Return Value: |
Returns a single line read from the file on success, or |
PHP Version: |
4.0+ |