Re: [PHP-DB] php + mysql + copy file

2008-04-04 Thread tacio vilela
Hi,

try this,

$carpeta = $_SERVER['DOCUMENT_ROOT']./subidos; // nombre de la carpeta ya
creada. chmool 777 (todos los permisos)
copy($_FILES['file']['tmp_name'] , $carpeta . $_FILE['file']['name']);

Regards,
Tacio Vilela


2008/4/2 Chris [EMAIL PROTECTED]:


  $carpeta = subidos; // nombre de la carpeta ya creada. chmool
  777
  (todos los permisos)
 
  copy($_FILES['file']['tmp_name'] , $carpeta . '/' . $_FILE
  ['file']['name']);
 

 It's $_FILES not $_FILE (an 's' on the end).

 It's always worth using error_reporting(E_ALL) and
 ini_set('display_errors', true) when doing development, this would have
 triggered a notice or warning (can't remember which).

 --
 Postgresql  php tutorials
 http://www.designmagick.com/

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
/***
*** ***
*** Tácio Vilela ***
*** MSN: [EMAIL PROTECTED] ***
*** SKYPE: taciovilela ***
*** ***
***/


[PHP-DB] php + mysql + copy file

2008-04-02 Thread Emiliano Boragina
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 ///
+  _

 



Re: [PHP-DB] php + mysql + copy file

2008-04-02 Thread Chris



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

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


It's $_FILES not $_FILE (an 's' on the end).

It's always worth using error_reporting(E_ALL) and 
ini_set('display_errors', true) when doing development, this would have 
triggered a notice or warning (can't remember which).


--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php