php + mysql + copy file

[email protected] ("Emiliano Boragina")
Newsgroups php.db
Message-ID <002c01c89515$5ca79ec0$6400a8c0@portboraarea1>
Hello

I have the next code:

 

-- archive_a_subir.php --

<form action="archivo_subir.php" method="post"
enctype="multipart/form-data">

         <input type="file" name="file">

         <input type="submit" value="ADJUNTAR ARCHIVO">

</form>

 

In archive_subir.php:

 

<?

         $carpeta = "subidos"; // nombre de la carpeta ya creada. chmool 777
(todos los permisos)

         copy($_FILES['file']['tmp_name'] , $carpeta . '/' . $_FILE
['file']['name']);

?>

 

You can see this in http://www.portbora.com.ar/foro/archivo_a_subir.php,
when I run these appears the next warning

 

Warning: copy(subidos/) [ <http://www.portbora.com.ar/foro/function.copy>
function.copy]: failed to open stream: Is a directory in
/home/pu000561/public_html/foro/archivo_subir.php on line 3

 

Why this? How can I run correctly?

Thanks.

 

+                                                                          _
   // Emiliano Boragina _

   // Diseño & Comunicación //////////////////
+                                                                          _

   // [email protected]  /
   // 15 40 58 60 02 ///////////////////////////
+                                                                          _
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.