substr() uses the string length, not the position as third argument. The corrected version of the following code line:
<?php
$parts[$s] = substr($file_txt, $starting_pos_body, $ending_pos_body-$starting_pos_body);
?>
mailparse_msg_extract_partDescriptionvoid mailparse_msg_extract_part ( resource rfc2045, string msgbody [, callback callbackfunc] )
If callbackfunc is not specified, the contents will be sent to "stdout".
add a note
User Contributed Notes
php at cdauth dot de
07-Jun-2006 03:01
substr() uses the string length, not the position as third argument. The corrected version of the following code line:
steve at tequilasolutions dot com
07-Apr-2006 01:36
Unless I've missed something obvious: | ||||||