file()+strip_tags() Vs. fgetss(). huge diffrence normal?
| From: | Hannes Magnusson | Date: | Mon, 16 Aug 2004 03:35:46 +0000 |
| Subject: | file()+strip_tags() Vs. fgetss(). huge diffrence normal? | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-12179@lists.php.net to get a copy of this message | ||
Hibb.
Is there suppost to be such a huge diffrence between these two methods?
Would have thougt combination of file() & strip_tags() would result in same results as fgetss()
<?php
$file = file ( "http://no2.php.net/" );
$fp = fopen ( "http://no.php.net/",
"r" );
$i = 0;
while ( !feof ( $fp ) ) {
echo "fgetss: "; var_dump ( trim ( fgetss ( $fp, 3072 ) ) );
echo "strip_tags: "; var_dump ( trim ( strip_tags ( $file[ $i++ ] ) ) ) ;
}
?>
See live example: http://62.249.185.14/examples/fgetss.php
- Hannes