|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-05-03 12:28 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 18:00:01 2025 UTC |
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 import\n"; 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