Home » File System » File » Bug #2305
bug about File::read()
Details
| Submitted | 2004-09-09 08:10 UTC |
|---|---|
| From | helloyejr at yahoo dot com dot cn |
| Status | Bogus |
| Package | File |
| PHP Version | 4.3.1 |
| OS | Redhat 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!