Dears,
Here are the two files for file upload, however, the file cannot be uploaded. I think that the folder for file upload in the linux server has not yet been changed to read/write mode. But where is the file uploaded to? Which file do we set the configuration in linux OS? The objective of file upload is to upload the picture in PHP webpage. Therefore, it is suggested that the picture file be uploaded to the "simon/public_html/image/" folder. Then how to make the configuration setting for the above requirement? please give me the details, thanks
Simon
The two files are given in the following
-----------
index.htm
--------------
<head><title>File upload test</title></head>
<body>
<Form Enctype="multipart/form-data" action="upload.php" 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>
-------------
upload.php
-------------
<?if (!@copy($userfile,"$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;?>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
</head>
<body bgcolor="#FFFFFF" text="#000000">
</body>
Here are the two files for file upload, however, the file cannot be uploaded. I think that the folder for file upload in the linux server has not yet been changed to read/write mode. But where is the file uploaded to? Which file do we set the configuration in linux OS? The objective of file upload is to upload the picture in PHP webpage. Therefore, it is suggested that the picture file be uploaded to the "simon/public_html/image/" folder. Then how to make the configuration setting for the above requirement? please give me the details, thanks
Simon
The two files are given in the following
-----------
index.htm
--------------
<head><title>File upload test</title></head>
<body>
<Form Enctype="multipart/form-data" action="upload.php" 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>
-------------
upload.php
-------------
<?if (!@copy($userfile,"$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;?>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
</head>
<body bgcolor="#FFFFFF" text="#000000">
</body>