PHP/HTML/HTML File

Материал из Web эксперт
Перейти к: навигация, поиск

fgetss: Gets line from file pointer and strip HTML tags

   <source lang="html4strict">

<?php

$tags = "

<a><img>"; $fh = fopen("demo.htm", "rt"); while (!feof($fh)) { $article .= fgetss($fh, 1024, $tags); } fclose($fh); /* Open the file up in write mode and write $article contents. */ $fh = fopen("demo.html", "wt"); fwrite($fh, $article); fclose($fh); echo $article; ?> </source>