note 34710 rejected from features.file-upload by didou
| From: | didou@php.net | Date: | Mon, 04 Aug 2003 23:05:55 +0000 |
| Subject: | note 34710 rejected from features.file-upload by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-53363@lists.php.net to get a copy of this message | ||
Note Submitter: dennis@inmarket.lviv.ua
----
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']