Re: sending attachment by email - can't find a bug?

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

 



Hello,

on 01/14/2005 03:00 PM Afan Pasalic said the following:
I have a form and once the form is submitted, php code build csv file with entered information and store it on server in temp file. Then send this file as an attachment to me. Code to send an attachment is included in main code.
The code to store csv file works fine.
I'm getting the attachment in email but can't open the file: "Alert: Unable to read the file".
Then I tried to create txt file and got the same result. Actually, I was able to open attached file but the file was empty?!?
Then accidentally, I changed the code back to create csv file but didn't change in code to send an attachment. after submitting the csv file was created but got by email earlier created txt file - and it works fine. I was able to open it?!?
My conclusion: I can't send just created file, but later, as a second process - it works just fine. And that means, code to send an attachment works as well.


Any ideas?

Maybe you are using PHP safe mode which disallow file creation and you are noty really verifying wether the file is created successfully.


--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux