I have the following code that generates the following error.  I am using
this code to prepare a zip or tar.gz file as an email attachment.  Can
someone suggest a better / more efficient way to do this and maybe avoid the
error???

I believe that the file that generated this error was about 1.8MB.

6 $fp = fopen($path.$filename, "r");
7 $content = fread($fp, filesize($path.$filename));
8 $attachment = base64_encode($content);
9 $attachment = chunk_split($attachment);

Fatal error: Allowed memory size of 8388608 bytes exhausted at (null):0
(tried to allocate 2228273 bytes) in
/home/user/public_html/dir/subdir/include/functions.php on line 9

Many thanks!
Shawn



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

Reply via email to