yes.. well from a quick glance the problem lies not in the MAX_FILE_SIZE or
not using the HTTP_POST_FILES

but more in the improper usage of the "copy" function


I saw it briefly and thought.. hmmm never used it.. but's it's param's look
wonky..


so yes I was right after a quick lookup on the function..


therefore point of story:

try this line instead:

copy($HTTP_POST_FILES['userfile']['tmp_name'],
"/img/".$HTTP_POST_FILES['userfile']['tmp_name'], );



and I strongly believe your problem will be fixed...


tell me if not..



good luck..





:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Julien Bonastre [The-Spectrum.org CEO]
A.K.A. The_RadiX
[EMAIL PROTECTED]
ABN: 64 235 749 494
Mobile: 0407 122 268
QUT Student #: 04475739
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::



----- Original Message -----
From: "Manisha" <[EMAIL PROTECTED]>
To: "php-general" <[EMAIL PROTECTED]>
Sent: Thursday, April 11, 2002 4:28 PM
Subject: Re: [PHP] Image Uploading not taking place


> yes, I have copied example from there itself, it is the max size which I
> forgot to copy in email but which is actually in a program.
>
> My html do contain max size tag. Still it is not working.
>
> ----------------html code ----------------
>
> <html>
> <body>
> <FORM ENCTYPE="multipart/form-data" ACTION="uploadtest.php" METHOD=POST>
> <input type="hidden" name="MAX_FILE_SIZE" value="1000">
> Send this file: <INPUT NAME="userfile" TYPE="file">
> <INPUT TYPE="submit" VALUE="Send File">
> </FORM>
> </body></html>
> -------------------------------------------------
>
> Following php file also have tried (with HTTP_POST....)
>
> --------------------Php code---------
> <?
> if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) {
>          copy($HTTP_POST_FILES['userfile']['tmp_name'], "/img");
> }
> else {
>          echo "Possible file upload attack. Filename: " .
> $HTTP_POST_FILES['userfile']['name']; }
> // move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'], "/img");
>
> echo "haha - file upload over";
> ?>
>
> ---------------------------------------------------
>
>
> STILL NOT GETTING LOADED. ANYTHING ELSE ?
>
>
>
>
>
> At 04:01 PM 4/11/02 +1000, you wrote:
> >At 1:52 PM +0800 11/4/02, Manisha wrote:
> >
> > >Image file uploading is not taking place.
> >
> >A 5 second glance at the manual page for file uploads would have shown
> >you what you're doing wrong *and* given you a cut-and-paste example of
> >how to do it right.
> >
> >http://www.php.net/manual/en/features.file-upload.php
> >
> >  ...R.
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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

Reply via email to