Re: Re: [PHP Attachement Problems - MAC ISSUE!!

From: Date: Tue, 05 Oct 2004 19:57:07 +0000
Subject: Re: Re: [PHP Attachement Problems - MAC ISSUE!!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-198717@lists.php.net to get a copy of this message
Ave, I replaced the code and added my PDF file in the required place, and this is what it displays now: Size 35823 Read 36704 I'll put in your address and send out the mail your way with the PDF attachment using the class script. Thanks a lot, Junkie On 10/5/04 3:51 PM, "Manuel Lemos" <mlemos@acm.org> wrote: > Hello, > > On 10/05/2004 04:40 PM, PHP Junkie wrote: >> Really appreciate your help. > > No problem. Sending mail with PHP is a saga to many users, not just > Macs. If there is something that can be done to workaround PHP problems > to avoid your problem, I will integrate it in that class. > > >> I created a new empty php file and put your given code in it. Upon running >> the test.php in my browser, it prints exactly this in my browser: >> >> could not open file > > Sorry, change it this way and replace your PDF file name where it says > your-PDF-file-name-here.pdf . > > > <?php > $filename="your-PDF-file-name-here.pdf"; > $size=filesize($filename); > if(!($file=fopen($filename,"rb"))) > die("could not open file ".$file_name); > $data=fread($file,$size); > echo "Size ",$size," Read ",strlen($data); > fclose($file); > ?> > > >> I have a PowerMac G5 Machine, with MacOS X. I have PHP 5 installed from >> entropy.ch and have the in-built Apache Web Server. Also, the MacOS X ships >> with Postfix Mail Server and I used the Postfix Enabler to configure it. So >> I use the Postfix Mail Server. > > Hummm... there should be no problem. Can you try using the class script > again and change it to send the message with the PDF attachment to: > mlemos@acm.org ?

« previous php.general (#198717) next »