문의하기 html
form 태그에 아래 enctype 꼭 추가!!!
enctype = "multipart/form-data"
<form method="post" class="contact-frm" id="frm" name="frm" action="contact_ok.php" target="param" onsubmit="return false;" enctype = "multipart/form-data">
<div class="contact-input">
<p class="es-checked">첨부파일</p>
<input type="file" id="H_File" name="H_File">
</div><!-- .contact-input -->
</form>
contact_ok.php에
$file = $_FILES['H_File'];
//-------------------------------
$Q_Body = str_replace('[FILE]', $file['name'], $Q_Body);
//-------------------------------
if ($file['name'] != "") {
$mail->addAttachment($file['tmp_name'],$file['name']);
};
추가
contac_template.html에
<tr>
<th>첨부파일</th>
<td>[FILE]</td>
</tr>
추가
728x90