RE: [PHP] File upload

From: Date: Thu, 07 Feb 2002 04:58:16 +0000
Subject: RE: [PHP] File upload
Groups: php.general 
Request: Send a blank email to php-general+get-83810@lists.php.net to get a copy of this message
Hi Balaji, > I am trying to upload a file from remote machine. > Could you please help out me. Two things: > upload.html > ------------- > <form action='upload.php' method='post' > enctype='multipart/form-data'> This also needs to have a maximum file size specified: <INPUT TYPE=HIDDEN NAME='MAX_FILE_SIZE' VALUE='200000'> > upload.php > ---------------- In this script, you'll want to copy $file to "/path/to/copy/to/filename". This doesn't seem to be what you're doing in the script you sent us, you overwrote $file with a new variable, $path - thus, losing the name of the temp file PHP copied the uploaded data into. Take care that you use the appropriate security measures to protect yourself against exploits here. Jason -- Jason Murray jasonm@melbourneit.com.au Web Developer, Melbourne IT "Work now, freak later!"

« previous php.general (#83810) next »