Hi all,
Heres a strange problem i am running into running Php4.2.2. I am
uploading a file using a post and when i receive the file on my share
the file adds some more records to it ( These are duplicate records
in the file). Dont know whats happening all input is appreciated.
Heres the code:
main.php
<?
....
echo "<FORM ENCTYPE='multipart/form-data' ACTION='abc.php'
METHOD=POST>";
echo "<INPUT TYPE=hidden name=MAX_FILE_SIZE value=1000000>";
echo "<INPUT NAME=userfile TYPE=file>";
echo "<INPUT TYPE=submit VALUE='Continue'>";
echo "</FORM>";
....
?>
abc.php
<?
....
$file = $HTTP_POST_FILES['userfile']['name'];
// this shows more than actual size;
echo $HTTP_POST_FILES['userfile']['size'];
if (is_uploaded_file($userfile)) {
copy($userfile, "/tmp/$file");
.... }
?>
Please advise.
Thanks
S