我在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>