带附件发送文件的php mail()函数无法打开

时间:2016-11-18 09:35:15

标签: php html forms

我在php中创建了带附件的mail()函数。图像或pdf被附加并发送到xyz@gmail.com,收到文件附件,但我没有打开文件。请检查我的代码并告诉我......

html代码:

select a.id, a.title
from album a
left join track t on t.albumid = a.albumid
left join playlistitem pi on pi.trackid = t.trackid
group by a.id, a.title
having sum(case when pi.trackid is not null then 1 else 0 end) = 0

php代码:

 <html>
 <body>
 <form action="send.php" enctype="multipart/form-data" method="POST">
  <label>Email: </label>
 <input type="text" name="to" placeholder="To" >
 <br> <br>
 <label>Message:</label>
 <textarea name="msg" placeholder="Message"></textarea>
 <br> <br>
 <label>Upload:</label>
 <input type="file" name="image" >
 <br> <br>
 <input type="submit" value="Submit" name="submit" >
 </form>
 </body>
 </html> 

0 个答案:

没有答案