PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » File System » File » Bug #2305

bug about File::read()

Details

Submitted2004-09-09 08:10 UTC
Fromhelloyejr at yahoo dot com dot cn
StatusBogus
PackageFile
PHP Version4.3.1
OSRedhat 8.0
Roadmaps(Not assigned)

Comments

[2004-09-09 08:10 UTC] helloyejr at yahoo dot com dot cn

Description:
------------
Hi,when use File::read() or File::readChar() or File::readAll() to get the output content of the same url in a for statement,but it return blank after the first cycle.What's fault?thanks!

Reproduce code:
---------------
get.php:
<?php
for ($i=0;$i<4;$i++)
{
if ($tmpstr = File::readChar('http://xxx/test.php')) echo "$tmpstr<br>";
}
?>

test.php
<?php
echo "1";
?>

Expected result:
----------------
1<br>
1<br>
1<br>
1<br>

Actual result:
--------------
1<br>
<br>

[2004-09-10 01:43 UTC] helloyejr at yahoo dot com dot cn

new code such as:

for($i=0;$i<4;$i++)
{
if (false !== $b = File::readChar('http://xxx/test.php')) echo "$b<br>";
}

but the result is all the same!