|
Posted by Manuel Lemos on 01/14/05 21:07
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
[Back to original message]
|