Hi, I'm trying to make an upload page so that a user can upload files into an archive folder for this organization... and I've run into a couple of problems...
1) When I try to upload a big enough file, I get
"Error 103 (net::ERR_CONNECTION_ABORTED): Unknown error."
2)When it does actually go through I get this error:
"The requested resource
/upload.php
does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit."
so, I googled this problem and people suggested to add things to .htaccess file, and I did... here is what I put down:
php_value upload_max_filesize 200M
php_value post_max_size 200M
php_value max_execution_time 800
php_value max_input_time 800
and that didn't help solve the problem. What should I do?
Here is the code if that helps:
1) When I try to upload a big enough file, I get
"Error 103 (net::ERR_CONNECTION_ABORTED): Unknown error."
2)When it does actually go through I get this error:
"The requested resource
/upload.php
does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit."
so, I googled this problem and people suggested to add things to .htaccess file, and I did... here is what I put down:
php_value upload_max_filesize 200M
php_value post_max_size 200M
php_value max_execution_time 800
php_value max_input_time 800
and that didn't help solve the problem. What should I do?
Here is the code if that helps:
PHP Code:
$target_path = "Archives/".$_POST['view']."/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']).
" has been uploaded";
}
else if(!isset($_FILES['uploadfile']))
{
echo'<center><table><form enctype="multipart/form-data" action="upload.php" method="POST">
<tr align=left><td>Upload to
<select name=view>
<option value=E-Board>Admin</option>
<option value=Public>Public</option>
</select> Section.</td></tr>
<tr align=left><td>Choose file: <input name="uploadedfile" type="file" /></td></tr>
<tr align=left><td><input type="submit" value="Upload File" /></td></tr></table></center>
</form>
';
}
else{
echo "There was an error uploading the file, please try again!";
}