|
|
|
ขอถามหน่อยนะคะ จะทำแบบว่าส่งการ์ดอ่ะค่ะ หน้าแสดงรูปทั้งหมด |
|
|
|
|
|
|
|
Code (PHP)
//*** Files 1 ***//
$strFilesName1 = "thaicreate1.txt";
$strContent1 = chunk_split(base64_encode(file_get_contents($strFilesName1)));
$strHeader .= "--".$strSid."\n";
$strHeader .= "Content-Type: application/octet-stream; name=\"".$strFilesName1."\"\n";
$strHeader .= "Content-Transfer-Encoding: base64\n";
$strHeader .= "Content-Disposition: attachment; filename=\"".$strFilesName1."\"\n\n";
$strHeader .= $strContent1."\n\n";
//*** Attachment Files ***//
$arrFiles[] = "thaicreate1.txt";
$arrFiles[] = "thaicreate2.txt";
$arrFiles[] = "thaicreate3.txt";
$arrFiles[] = "thaicreate4.txt";
$arrFiles[] = "thaicreate5.txt";
for($i=0;$i<count($arrFiles);$i++)
{
if(trim($arrFiles[$i]) != "")
{
$strFilesName = $arrFiles[$i];
$strContent = chunk_split(base64_encode(file_get_contents($strFilesName)));
$strHeader .= "--".$strSid."\n";
$strHeader .= "Content-Type: application/octet-stream; name=\"".$strFilesName."\"\n";
$strHeader .= "Content-Transfer-Encoding: base64\n";
$strHeader .= "Content-Disposition: attachment; filename=\"".$strFilesName."\"\n\n";
$strHeader .= $strContent."\n\n";
}
}
Go to : PHP Sending Email Attachment Files
|
|
|
|
|
Date :
2011-07-24 08:52:34 |
By :
thaicreate |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|