Re: upload problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux