Re: [phplib] HELP: Problem uploading files in PHP From: Bill Peck (bill <email protected>)
Date: 06/26/01

First lets assume the upload variable is call $file.

It could also be that your script is copying the $file_name variable
instead of $file. $file_name is the name of the file from the computer
that uploaded it. $file is the name of the file on the server after its
been uploaded. I use this to handle my uploads for pictures..

$dest="/home/httpd/html/images/" . basename($file_name));
if( <email protected>("cp '$file' '$dest'")!=0) {
                echo "Unable to create '$dest' - check permissions<br>\n";
}

On 26 Jun 2001 13:24:38 +0200, Stephan Ullmann wrote:
> Hi
>
> append phpinfo(); to your script and see whats being uploaded....
>
> Bye
> Stephan
>
> On Tue, 26 Jun 2001, Lazaro Ferreira wrote:
>
> > Hi
> >
> > I need help though a bit off topic, I hope that somebody in the list have had this problem before
> >
> > I have a script that uploads files to the server. It contains a simple form with a file input field and a submit button. I have exactly the same php setup at my Personal Computer (PC) and my ISP server. The script runs ok on my PC but do nothing at the server. When I click on the submit buttom the browser re-open the page with the form cleaned. It seems like it doesn't post anything to the server, any idea ?
> >
> > The problem have all to do with the file input field in my form
> >
> > Thanks for your time
> > Lazaro
> >
>
> --
> Dipl.-Ing. Stephan Ullmann Tel: +49 89 289-16008
> Fachgebiet Raumfahrttechnik Fax: +49 89 289-16004
> Technische Universität München
> Boltzmannstr. 15
> 85748 Garching, Germany Email: S.Ullmann <email protected>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: phplib-unsubscribe <email protected>
> For additional commands, e-mail: phplib-help <email protected>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>