<?php
if($_POST['uae']){
move_uploaded_file($_FILES["file"]["tmp_name"], FS_DOC_ROOT . 'uploads/' . urlencode($_FILES['file']["name"]));
mail("email@address","Uploaded File for you",$_POST['message']."\n\nTo view the file please follow the following link: ".HTTP_SERVER."uploads/".urlencode($_FILES['file']['name']).".","FROM: DONOTREPLY <[email protected]>");
echo "<div style='background: green;color: #ffffff;padding: 5px;'>All sent... send another one below.</div>";
}
?>
<form method="post" action="uploadandemail.html" enctype="multipart/form-data">
<table>
<tr>
<td>Choose a file to upload:</td>
<td><input type="file" name="file" /></td>
</tr>
<tr>
<td valign="top">Message:</td>
<td><textarea name="message" cols="40" rows="40" style="height: 150px;">I have uploaded a file for you.</textarea><br />This will be superceeded with "To view the file please follow the following link: http://linktoyour.new/file.doc".</td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="uae" value="Upload and Email" /></td>
</tr>
</table>
</form>
It doesn't work - it will quite happily upload a small image or a PDF but it don't upload an mp4 or an mpeg. It doesn't even try it, the page just refreshes straight away.
Any ideas? php.ini is set to 100M max upload.
This is my php5.ini file:
error_reporting = E_ALL
upload_max_filesize = 100M
Thanks