Re: problema con upload

From: Date: Thu, 04 Apr 2002 22:05:31 +0000
Subject: Re: problema con upload
References: 1  Groups: php.general.es 
Request: Send a blank email to general-es+get-21165@lists.php.net to get a copy of this message
Not a directory in /home/alejandro/public_html/mundoweb/lafe/file.php on line 15 No es un directorio? ----- Original Message ----- From: "Luis Mario" <mario@mundoweb.com.mx> To: <lista@phpes.com> Sent: Thursday, April 04, 2002 6:40 PM Subject: [PHP-ES] problema con upload > hola listeros tengo un problema con el upload > > me marca este error: > > Warning: Unable to create '/public_html/mundoweb/lafe/imagesQA.txt': Not a > directory in /home/alejandro/public_html/mundoweb/lafe/file.php on line 15 > > el codigo es el siguiente > > //-------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---- > <?php > > function handleupload() { > $dir= "/public_html/mundoweb/lafe/images"; > if (is_uploaded_file($_FILES['userfile']['tmp_name'])) { > > $filename = $_FILES['userfile']['tmp_name']; > print "$filename was uploaded successfuly"; > > $realname = $_FILES['userfile']['name']; > print "realname is $realname"; > > print "copying file to uploads dir"; > > copy($_FILES['userfile']['tmp_name'],$dir.$realname); > } else { > echo "Possible file upload attack: > filename".$_FILES['userfile']['name']."."; > } > } > > ?> > > <html><body> > > <?php > > if ($act == "upload") { > handleupload(); > } > > ?> > > <form ENCTYPE="multipart/form-data" method="POST" action="file.php?act=upload"> > File:<INPUT TYPE="FILE" NAME="userfile" SIZE="35"> > <input type="hidden" name="MAX_FILE_SIZE" value="1000000"> > <input type="submit" value="Upload" name="B1"> > Please click only <b>once</b> and wait for confirmation > </form> > > > <a href=file.php>clear form</a> > > </body></html> > > > --------------------------------------------------------------------- > Archivo On-line: http://www.phpes.com/ > via news: news://news.phpes.com/ > Manual PHP en español: http://www.php.net/manual/es/ > Para dar de baja la suscripción, mande un mensaje a: > lista-unsubscribe@phpes.com > >

« previous php.general.es (#21165) next »