html文本框:发送html、附件、文本文件、html图片的类(2)来源: 发布时间:星期四, 2009年2月12日 浏览:163次 评论:0
*******************************************************************************/ function formatAttachmentHeader($inFileLocation){ $outAttachmentHeader = \"\"; //--get content type based _disibledevent=>= $this->getContentType($inFileLocation); //-- ![]() ![]() //--format header $outAttachmentHeader .= \"Content-Type: \".$contentType. \";n\"; $outAttachmentHeader .= \' name=\"\'.basename($inFileLocation). \'\"\'. \"n\"; $outAttachmentHeader .= \"Content-Transfer-Encoding: 7bitn\"; $outAttachmentHeader .= \"Content-Disposition: attachment;n\"; //--other: inline $outAttachmentHeader .= \' filename=\"\'.basename($inFileLocation). \'\"\'. \"nn\"; $textFile = fopen($inFileLocation, \"r\"); //--loop through file, line by line while(!feof($textFile)){ //--get 1000 chars or (line ![]() ![]() $outAttachmentHeader .= fgets( $textFile,1000); } //--close file fclose($textFile); $outAttachmentHeader .= \"n\"; } //--NON-TEXT use 64-bit encoding ![]() //--format header $outAttachmentHeader .= \"Content-Type: \".$contentType. \";n\"; $outAttachmentHeader .= \' name=\"\'.basename($inFileLocation). \'\"\'. \"n\"; $outAttachmentHeader .= \"Content-Transfer-Encoding: base64n\"; $outAttachmentHeader .= \"Content-Disposition: attachment;n\"; //--other: inline $outAttachmentHeader .= \' filename=\"\'.basename($inFileLocation). \'\"\'. \"nn\"; //--call uuencode - output is ![]() ![]() exec( \"uuencode -m $inFileLocation nothing_out\",$ ![]() //--add each line ![]() for ($i = 1; $i<(count($ ![]() ![]() $outAttachmentHeader .= $ ![]() [1][2][3][4][5][6][7][8][9]下 ![]() 0
相关文章读者评论发表评论 |