Your files are being uploaded to the pre-defined temporary directory.
$userfile contains the name of the temporary file the file was uploaded as.
After you run all the checks on the file to make sure its valid, you should
use copy() to move the file to its permament home in your file system, then
use unlink() to remove the temporary file.

http://www.php.net/manual/en/features.file-upload.php contains a whole bunch
of information on the topic that may be useful

--
Liz Fulghum
--------------------------------------------------------------
http://www.lipstickalley.com/ - Be Popular!
Want to learn PHP?
http://webdeveloper.earthweb.com/scripting/article/0,,12014_900521,00.html
--------------------------------------------------------------

"Andrzej Roszkowski" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Hi!
>
> Where is file upload function? ;) From begining: some time I've found
somewhere
> this handler:
> clearing_report_file is the input that is user sends to me.
>
>     if(!isset($clearing_report_file))
>     {
>         pp_xfer_trans();
>     }
>     else
>     {
>     if (!@copy($clearing_report_file, $CFG["local_uri"]."/cfd-" . $batch
> .".txt")) {
>             echo("\n<b>Something barfed, check the path to and the
permissions
> for the upload directory</b>");
>         }else
>         {
> // do domething
>             exit();
>         }
>
>     }
>
>
> but now, in php 4.0.5 this function don't want to work ;( i have allways
> something barfed message, even if i try to wrote to /tmp directory
>
> now i have this in phpinfo:
>
> HTTP_POST_FILES["userfile"]
>
> Array
> (
> [name] => helyjon
> [type] =>
> [tmp_name] => none
> [size] => 0
> )
>
> where is my file? $variables shows the same values, where are my contents?
>
> ------------------------------------------------------------------------
> Code reviews are like sex, just anyone can do it, but skill and training
> can make you a lot better at it." - LJ
> Thomas
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to