php + mysql + copy file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 //////////////////
+                                                                          _

   // emiliano.boragina@xxxxxxxxx  /
   // 15 40 58 60 02 ///////////////////////////
+                                                                          _

 


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux