附件电子邮件表格!?如何创建文件上传表单以通过电子邮件发送
我一直在寻找这个,但找不到任何可以帮助我的表格!我不精通php,我需要为客户端创建一个表单,创建表单没有问题,但他们想要一个文件上传功能,它将文件作为附件发送,而不是将其上传到服务器。
我在网上找到了一个使用 PEAR 的程序,但我在让它在共享主机帐户上运行时遇到了很大的麻烦。
有人可以帮忙吗!有没有任何“现成”的表格可供我使用?
谢谢!
编辑-请在此处阅读我的后续问题:
https:// stackoverflow.com/questions/6138979/adding-an-upload-file-field-to-a-php-form
I've been searching high and low for this and can't find any forms that will help me! I'm not proficient with php and I need to create a form for a client, creating the form is no problem, but they want a file upload function which will send the file as an attachment NOT upload it to the server.
I found one on the net that uses PEAR but I was having big trouble getting it working on a shared hosting account.
Could anyone help please! Is there any forms "ready made" that I can use for this?
Thanks!
EDIT- PLEASE READ MY FOLLOW UP QUESTION HERE:
https://stackoverflow.com/questions/6138979/adding-an-upload-file-field-to-a-php-form
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我曾经使用过从 www.webmastercode.com 下载的 PHP 脚本,并且效果很好。以下是一个网站的链接,解释了它的作用:http://blogs.sitepoint.com/高级电子邮件-php/。希望这有帮助!
I've used a PHP script downloaded from www.webmastercode.com once, and it worked well. Here's a link to a site which explains what it does: http://blogs.sitepoint.com/advanced-email-php/. Hope this helps!
我认为 MIME 很适合用在这里。设置起来非常简单(只需一些
includes()
)上面的代码要求您包含 MIME 扩展名,并且添加附件的最佳选择可能是上传文件,发送电子邮件,然后删除该文件。
I'm thinking that MIME is good to be used here. It's very simple to set up (just some
includes()
s)The above code requires that you have the MIME extension included and your best bet for adding an attatchment is probably to upload the file, send the email, then delete the file.
您可以制作一个临时上传文件 php 脚本并将更改放在表单中,以便将临时文件作为附件?
所以要上传临时文件
,然后您可以将临时文件作为您的附件,所以......
类似的东西?
大部分上传 php 脚本来自...
http://www.w3schools.com/PHP/ php_file_upload.asp
但其他人是斗鱼:-p
you could make a temp upload file php script and put the change the form so it will make the temp file as the attachment?
so to upload a temp file
then you can make the temp file to be your attachment so...
something like that?
got most of the upload php script from...
http://www.w3schools.com/PHP/php_file_upload.asp
but the other guys one is betta :-p