Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #6754
| Path | csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | "J.O. Aho" <user@example.net> |
| Newsgroups | comp.lang.php |
| Subject | Re: How to NOT send empty files via email? |
| Date | Thu, 09 Aug 2012 18:04:00 +0200 |
| Lines | 20 |
| Message-ID | <a8i5bhFsulU1@mid.individual.net> (permalink) |
| References | <3dcfc489-6244-4920-a975-ab9db64ffe10@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net ot4u1SywtskfUyl541eB5Qpj/0dJAv+/d9ymaGji+Qig+eVWeAICYGBZhc4qAw3GIJ |
| Cancel-Lock | sha1:wN7NzuKNIvP73Geg+ED9nw2h9jk= |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120807 Thunderbird/14.0 |
| In-Reply-To | <3dcfc489-6244-4920-a975-ab9db64ffe10@googlegroups.com> |
| Xref | csiph.com comp.lang.php:6754 |
Show key headers only | View raw
On 09/08/12 17:19, pauly814@gmail.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
Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread
How to NOT send empty files via email? pauly814@gmail.com - 2012-08-09 08:19 -0700 Re: How to NOT send empty files via email? "J.O. Aho" <user@example.net> - 2012-08-09 18:04 +0200
csiph-web