Re: upload problem

From: Date: Wed, 23 Jan 2008 01:09:07 +0000
Subject: Re: upload problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-267873@lists.php.net to get a copy of this message
nihilism machine wrote:
any ideas why this does not work?
1) the field in the form might not be 'upload1'. 2) the file is too big to upload (> max_upload_size) 3) the /tmp folder might not be writable or full 4) the folder you're trying to write into is not writable (or the drive is full) 5) the rename might not work (same reasons as above) 6) the chmod might fail that'll do for starters :) add error_reporting(E_ALL); and ini_set('display_errors', true); in your script and see what's going on. instead of doing a move-uploaded-file then a rename, combine them: $destination = 'admin/advertisements/' . basename($_FILES['upload1']['name']); if (move_uploaded_file($src, $destination)) { ... } ... -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#267873) next »