On Sunday 12 January 2003 20:39, Kyle Babich wrote:
> This is what I tried:
>
> if (is_uploaded_file($HTTP_POST_FILES['image1']['image1']) {
>       move_uploaded_file($HTTP_POST_FILES['image1']['image1'],
> "$DOCUMENT_ROOT/images/$file"); }
>
> and also this:
>
> if (is_uploaded_file($_FILES['image1']['image1']) {
>       move_uploaded_file($_FILES['image1']['image1'],
> "$DOCUMENT_ROOT/images/$file"); }
>
> and this:
>
> if (is_uploaded_file($_FILES['image1']['image1'])) {
>     copy($_FILES['image1']['image1'], "$DOCUMENT_ROOT/images");
> }
>
> ,the image (which was within the size range) was never uploaded.  I have
> a feeling that I am makeing 1 or 2 of the same mistakes in all three but
> through my experimenting and reading I am having no luck.  I also bought
> Programming PHP but I trust it less and less as I even find simple
> mistakes like missing quotes in example code.  So what's going wrong?

So what *does* $_FILE contain? 

Hint: if your code doesn't behave as expected always print_r() your variables 
so you can whether they contain what you expected them to contain.

And if $_FILE doesn't contain anything then check php.ini to ensure that you 
have enables file uploads.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Wilcox's Law:
        A pat on the back is only a few centimeters from a kick in the pants.
*/


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

Reply via email to