RE: Re[2]: Enviar Attach via PHP

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

 



Gaston,

lo que puedes hacer, es upload the file to the WebServer primero y luego call your function from there.  Cuando el Attachment, esta en el WebServer, puedes facil, manipular the file.

--
Gerardo S. Rojas
mailto: grojas@xxxxxxxxxxxxxxxx


-----Original Message-----
From: Gastón Quiroga [mailto:tango@xxxxxxxxxxxxxxxx]
Sent: Thursday, July 22, 2004 2:52 PM
To: php-windows@xxxxxxxxxxxxx
Subject: Re[2]:  Enviar Attach via PHP


Gracias Gerardo por tu respuesta...

estuve investigando mas a fondo el problema y saqué algunas conclusiones:

La línea de la clase es

$a-> Attach(<archivo>,<tipo_arch>, <modo_attach>)

donde <archivo> es el nombre del archivo con el fullpath, <tipo_arch> es el tipo de
attach (text/plain, application/rtf, etc) y <modo_attach> es la forma en que pega el attach al mensaje (opcional).

mi problema es que cuando posteo el form (POST) (cuya variable del campo FILE es
"archivo")

envío lo siguiente

$a-> Attach($_FILE['archivo']['name'],$_FILE['archivo']['type'])


donde $_FILE['archivo']['name'] es, por ejemplo, foo.txt, cuando en realidad debería
ser c:\windows\escritorio\foo.txt. Creo que el problema está en que no le puedo
pasar el PATH completo y por eso no lo puedo envíar.


any advice??

gracias nuevamente !

-- 
Saludos,
 Gastón.


8<--------------------------------------------

> Trata de, debug.  Estas seguro que $_POST['arhchiv'] tiene el variable
> correcto?  Si lo tiene bien, entonces trate esto

> $fullpath = $_POST['archiv'];

$m->>Attach( $fullpath, "text/plain", "foo.txt");

> --
> Gerardo S. Rojas
> mailto: grojas@xxxxxxxxxxxxxxxx


> -----Original Message-----
> From: Gastón Quiroga [mailto:tango@xxxxxxxxxxxxxxxx]
> Sent: Thursday, July 22, 2004 1:46 PM
> To: php-windows@xxxxxxxxxxxxx
> Subject:  Enviar Attach via PHP


> Hola,
>     es la primera vez que escribo a la lista, pero desde hace rato soy
>     participante. La consulta es la siguiente.

>     Yo estoy usando una class para enviar mails (con/sin attachments) via PHP que funciona
>     perfecto cuando no envío attachs o cuando en la linea de attach pongo
>     "ruta/nombre" del archivo ej:

>     $m->Attach( "c:/foo.txt", "text/plain", "foo.txt" );

>     pero cuando quiero que tome la variable de archivo desde un formulario POST no me lo
>     envía: ej:

>     $m->Attach ("$_POST['arhchiv']","text/plain", "foo.txt");

>     tampoco funciona con $_FILE.

>     Seguramente estoy teniendo un error conceptual pero no logro saber cual, me
>     podrían ayudar ??

>     Gracias!!
    
>  Gastón.


> 8<--------------------------------------------

>> On Thu, 22 Jul 2004 10:40:33 -0400, Jim MacDiarmid
>> <jim.macdiarmid@xxxxxxxxxxx> wrote:
>>> 
>>> [ Exerp from PHP manual pages on website:
>>> "Warning Do not use Apache 2.0 and PHP in a production environment neither
>>> on Unix nor on Windows." ]
>>> 
>>> Can anyone tell me what this means?  This is the only warning I see.
>>> 

>> Please search the archives before posting, we were talking about this yesterday.
>> http://marc.theaimsgroup.com/?l=php-general&m=109021837828927&w=2

>> -- 
>> DB_DataObject_FormBuilder - The database at your fingertips
>> http://pear.php.net/package/DB_DataObject_FormBuilder

>> paperCrane --Justin Patrin--





> ---------------------
> 12º Mandamiento Linux:
> Sí adulterarás, y te harás compatible
> con cuantos sistemas se dejen
> ---------------------





---------------------
12º Mandamiento Linux:
Sí adulterarás, y te harás compatible
con cuantos sistemas se dejen
---------------------

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

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



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux