Uploading Files
Posted: Tue Jan 10, 2006 8:24 pm
Hi,
From my clients admin interface, I have a form based upload script. All works great until the files are over 2.5mb, at which point my copy() fails.
Any idea's what I need to do to allow slightly larger files? (I can't forsee them going over 3mb, but maybe 4 to be safe).
From my clients admin interface, I have a form based upload script. All works great until the files are over 2.5mb, at which point my copy() fails.
Any idea's what I need to do to allow slightly larger files? (I can't forsee them going over 3mb, but maybe 4 to be safe).
Code: Select all
// CHECK IF FORM SUBMITTED
if ($_POST['Submit']) {
$NEWPRODUCT = new Download;
$NEWPRODUCT->title = $_POST['title'];
$NEWPRODUCT->table = $_POST['table'];
$NEWPRODUCT->productid = $_POST['productid'];
// UPLOAD FILE
if ($_FILES['download']) {
copy ($_FILES['download']['tmp_name'],"../secretdir/".$_FILES['download']['name']) or die ("Could not copy");
$NEWPRODUCT->filename = $_FILES['download']['name'];
}
$NEWPRODUCT->NewDownload();
header("Location: products.php");
}