FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » How to NOT send empty files via email?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: How to NOT send empty files via email? [message #178825 is a reply to message #178824] Thu, 09 August 2012 16:04 Go to previous message
J.O. Aho is currently offline  J.O. Aho
Messages: 194
Registered: September 2010
Karma:
Senior Member
On 09/08/12 17:19, pauly814(at)gmail(dot)com wrote:
> Hi,
> I have a simple php page that grabs a .txt file if it exists and emails it.

In your example you don't.

> I would like to modify it so that if the file is under 60 bytes, dont send it.
>
> Here is what I am doing to send the file:
> $messageBody .=file_get_contents("d:\notes\note $filedate.txt");
> $messageBody .= "\n\r==============================================================\n\r";
> $messageBody .=file_get_contents("d:\notes\middaynote $filedate.txt");

Check the size of what you get from file_get_contents() of use function
like filesize()


--

//Aho
[Message index]
 
Read Message
Read Message
Previous Topic: How to make Apache to allow an executable to leave a file?
Next Topic: How to make Apache to allow an executable to leave a file?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Dec 01 01:09:52 GMT 2024

Total time taken to generate the page: 0.04231 seconds