PHP funkce fgets()
06. 07. 2020Dostupnost ve verzích: PHP 4.0
Gets line from file pointer
Parametry
Parametr | Datový typ | Výchozí hodnota | Poznámka |
---|---|---|---|
$handle | resource | ||
$length | int | null | Reading ends when length - 1 bytes have been read, on a newline (which is included in the return value), or on EOF (whichever comes first). If no length is specified, it will keep reading from the stream until it reaches the end of the line. |
Návratové hodnoty
string
a string of up to length - 1 bytes read from the file pointed to by handle.
If an error occurs, returns false.
Další zdroje
https://php.net/manual/en/function.fgets.php
Jan Barášek Více o autorovi
Autor článku podniká jako fullstack senior developer v Praze. Spravuje 300 různě velkých webových projektů, fungujících dodnes. Během spolupráce nabral hluboké zkušenosti, které na tomto webu předává dál.
Rád vám pomůžu:
Kontakt Konzultace a služby Nabídka spolupráce