Bug #10637 Updated: Reading a file into array using file() from Windows IE and Opera
| From: | sniper@php.net | Date: | Thu, 03 May 2001 16:28:20 +0000 |
| Subject: | Bug #10637 Updated: Reading a file into array using file() from Windows IE and Opera | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-53657@lists.php.net to get a copy of this message | ||
ID: 10637
Updated by: sniper
Reported By: a.j.dudas@dur.ac.uk
Old-Status: Open
Status: Closed
Bug Type: Filesystem function related
PHP Version: 4.0.4pl1
Assigned To:
Comments:
Please upgrade to PHP 4.0.5 as this should be fixed in it.
Reopen this bug report if this is not the case.
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2001-05-03 12:09:19] a.j.dudas@dur.ac.uk
Using this to submit:
echo "<form action="import.php" method="post"
enctype="multipart/form-data" >n";
echo "<input type="file" name="filename"><br>Click browse to
select a file to importn";
echo "<br>";
echo "n<br><br><input type="submit" value="Import
Database">n</form>n";
and this to read the text file into an array:
$fcontents = $file($filename);
works perfectly when from the Linux box and using Netscape 4.6 in Windows, but does not work from IE
5.5 or Opera 5.10 in Windows.
They both give an HTML output of:
Warning: file("Content-Type: text/plain; name="savedrecs.txt" ...text cut out... JI
Bioche in /home/httpd/html/paper_database/includes/classes.inc on line 312
and this when trying to read it into an array, as it has not read it into the array:
Warning: Variable passed to each() is not an array or object in
/home/httpd/html/paper_database/import.php on line 41
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10637&edit=2