File upload problem

admin

Administrator
Staff member
Dear all,

Under win98 OS where apache server has been installed. The simple program for file upload does not have any response when the form is submitted.

The configuration file (PHP.INI) have been set in the following,

file_uploads = On
upload_tmp_dir = d:\tmp
upload_max_filesize = 2M

Please give me any help, thanks

Simon

Here is the code
-------------------------------------
<?
if ($submit):
if (!@copy($userfile,"d:/$userfile_name")):
print("Upload unsuccessfully, $userfile_name ...<br>\n");
else:

echo "File Name锛?quot;,$userfile_name,"<br>";
echo "File size锛?quot;,$userfile_size,"<br>";
echo "File type锛?quot;,$userfile_type;

endif;

else:?>


<head><title>File upload test</title></head>
<body>
<Form Enctype="multipart/form-data" action="<? $PHP_SELF ?>" Method=POST>
<Input Type="hidden" name="MAX_FILE_SIZE" value=http://www.phpbuilder.com/board/archive/index.php/"2000">
File name:<Input name="userfile" Type="file"><br>
<Input Type="submit" VALUE="Start upload">
</Form>
</body>

<?
endif
?>
 
Back
Top