php + copy file
| From: | Emiliano Boragina | Date: | Wed, 02 Apr 2008 23:05:51 +0000 |
| Subject: | php + copy file | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-272464@lists.php.net to get a copy of this message | ||
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>
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>
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@gmail.com /
// 15 40 58 60 02 ///////////////////////////
+
+ _