PHP fgetss() Fungsi
Referensi Sistem File PHPContoh
Baca satu baris dari file HTML terbuka (tag strip):
<?php
$file = fopen("test.htm","r");
echo fgetss($file);
fclose($file);
?>
Definisi dan Penggunaan
Fungsi fgetss() mengembalikan baris dari file terbuka - dihapus dari tag HTML dan PHP.
Catatan: Fungsi fgetss() tidak digunakan lagi dari PHP 7.3.
Sintaksis
fgetss(file, length, tags)
Nilai Parameter
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 |
Detail Teknis
Nilai Kembali: | Satu baris dibaca dari file jika berhasil, FALSE pada EOF atau error |
---|---|
Versi PHP: | 4.0+ |
Referensi Sistem File PHP