English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
La funzione fgetss() può restituire una riga filtrata di HTML e tag PHP da un file aperto. Questa funzione può fermarsi a una lunghezza specificata o EOF (quello che appare per primo) e restituire False in caso di fallimento.
string fgetss ( resource $handle [, int $length [, string $allowable_tags ] ] )
Questa funzione è simile a quella di fgets(), ma fgetss() può cercare di filtrare tutti i tag HTML e PHP dal testo letto.
<?php $handle = @fopen("/PhpProject/test.php", "r"); if ($handle) { while (!feof($handle)) { $buffer = fgetss($handle, 4096); echo $buffer; } fclose($handle); } ?>
Risultato di output
Benvenuto su oldtoolbag.com
<?php $handle = @fopen("/PhpProject/test.php", "r"); if ($handle) { while (!feof($handle)) { $buffer = fgetss($handle, 4096, ", "); echo $buffer; } fclose($handle); } ?>