PHP funkce fgetss().
❮ Reference souborového systému PHPPříklad
Přečtěte si jeden řádek z otevřeného souboru HTML (značky strip):
<?php
$file = fopen("test.htm","r");
echo fgetss($file);
fclose($file);
?>
Definice a použití
Funkce fgetss() vrací řádek z otevřeného souboru – zbavený značek HTML a PHP.
Poznámka: Funkce fgetss() je v PHP 7.3 zastaralá.
Syntax
fgetss(file, length, tags)
Hodnoty parametrů
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 |
Technické údaje
Návratová hodnota: | Jeden řádek přečtený ze souboru při úspěchu, FALSE při EOF nebo chybě |
---|---|
Verze PHP: | 4,0+ |
❮ Reference souborového systému PHP