note 34710 added to features.file-upload
| From: | dennis at inmarket dot lviv dot ua | Date: | Mon, 04 Aug 2003 22:35:01 +0000 |
| Subject: | note 34710 added to features.file-upload | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-53361@lists.php.net to get a copy of this message | ||
Hey, i found out that under php 4.3.2/linux this script doesn't work:
<html>
<body>
<form name="form" action="test.php" enctype="multipart/form-data"
method="post">
<input name="form[file]" type="file">
<input type="hidden" name="form[detectContentType]" value="">
<input type="checkbox" name="form[detectContentType]" value="1"
checked>
<input type="hidden" name="form[submitted]" value="true">
<input type="hidden" name="pspsession"
value="13579246801357924680">
<input type="submit" value="go" name="form[go]">
</form>
<?
if(@$form['submitted']) {
echo "Local file: " . $form['file'] . "<br>";
echo "Size: " . $form_size['file'] . "<br>";
echo "Orig.name: " . $form_name['file'] . "<br>";
echo "<hr>";
$f = fopen($form['file'], "rb");
echo fgets($f, 1000);
}
?>
It comes without the form['file']! While on my home win98/php4.1.1 works just great! The
only way to correct this (I think PHP bug) was using the
$_FILES['form']['tmp_name']['file']
----
Manual Page -- http://www.php.net/manual/en/features.file-upload.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34710
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34710&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34710&report=yes