Função PHP fgetss()
❮ Referência do sistema de arquivos PHPExemplo
Leia uma linha do arquivo HTML aberto (tags de tira):
<?php
$file = fopen("test.htm","r");
echo fgetss($file);
fclose($file);
?>
Definição e uso
A função fgetss() retorna uma linha de um arquivo aberto - retirado das tags HTML e PHP.
Nota: A função fgetss() está obsoleta do PHP 7.3.
Sintaxe
fgetss(file, length, tags)
Valores de parâmetro
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 |
Detalhes técnicos
Valor de retorno: | Uma única linha lida do arquivo em caso de sucesso, FALSE em EOF ou erro |
---|---|
Versão do PHP: | 4.0+ |
❮ Referência do sistema de arquivos PHP