English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP Filesystem Reference Manual
The fgetss() function can return a line from the opened file, filtered out of HTML and PHP tags. This function can stop returning a new line of specified length or EOF (whichever comes first), and returns False on failure.
string fgetss ( resource $handle [, int $length [, string $allowable_tags ] ] )
This function is similar to the fgets() function, the difference being that the fgetss() function can attempt to filter out all HTML and PHP tags from the read text.
<?php $handle = @fopen("/PhpProject/test.php", "r"); if ($handle) { while (!feof($handle)) { $buffer = fgetss($handle, 4096); echo $buffer; } fclose($handle); } ?>
Output Result
Welcome to oldtoolbag.com
<?php $handle = @fopen("/PhpProject/test.php", "r"); if ($handle) { while (!feof($handle)) { $buffer = fgetss($handle, 4096, ", "); echo $buffer; } fclose($handle); } ?>