I'm sorry for my sugestions because it's true fgets reads frm file to first \n char, but i have problem with this line endings and i'll use this function witchout chop(). I don't know where is the problem and it is my first problem like that (i'm php programer for few years).

Sorry for my English ...
Marcin

Ryo Chijiiwa napisaƂ(a):
Since fgets reads up to the first new line or the maximum length
specified (i.e. 5000), if the original line lengths are 76 bytes, the
resulting lines will still be 76 bytes.

Ryo

On 1/19/2006, "Marcin Rozmarynowski" <[EMAIL PROTECTED]> wrote:

I think that 5000 bytes is too much to do 76 chars per line after coding
.... but You are a chief :)
it was only sugestion but it works fine.

I think the correct line should be:

    $line = chop(fgets($ul_fp,5000))."\r\n";

This way the line endings will be "\r\n" regardless of what it is
$ul_fp.

Ryo

On 1/12/2006, "Andrew Alderwick" <[EMAIL PROTECTED]> wrote:


On 12/1/2006, "Andrew Alderwick" <[EMAIL PROTECTED]> wrote:
On 12/1/2006, "spike2k" <[EMAIL PROTECTED]> wrote:
I have a solution for problem with attachments;

in file include/compose_package.inc i line

//straight transfer if already encoded
while(!eof($ul_fp)){
=>>> $line = chop(fgets($ul_fp,5000));

change to $line = fgets($ul_fp,5000);

without chop(), because this instruction delete whitespaces from string 
(including \n charakter which trims base64 coded attachment into 76 chars per 
line)
Excellent find. I've also noticed that if the file pointed by $ul_fp is
over 5000 bytes, the beginning of the file would be discarded. Unless
I'm missing something,

$line .= fgets($ul_fp, 5000);

would be even better.
No, it wouldn't. Ignore me! I've just looked at the source - $line is
dealt with before the loop begins again.

If we're chopping out the "chop", do we need to echo \r\n in the
next statement, I wonder?

Andy


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Ilohamail-devel mailing list
Ilohamail-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ilohamail-devel


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Ilohamail-devel mailing list
Ilohamail-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ilohamail-devel







-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Ilohamail-devel mailing list
Ilohamail-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ilohamail-devel

Reply via email to