脚本宝典收集整理的这篇文章主要介绍了使用SwiftMailer和PHP检索要附加到电子邮件的文件名,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
//File upload // Where the file is going to be placed $target_path = "uploads/"; // Add the original filename to our target path. //Result is "uploads/filename.extension" $target_path = $target_path . basename( $_FILES['uploadeDFile']['name']); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'],$target_path)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; } else{ echo "There was an error uploading the file,please try again!"; } //End of file upload
这是文件附加部分:
//Create the attachment $attachment = Swift_Attachment::FromPath($_FILES['uploadedfile']['tmp_name']);
为什么不从服务器获取文件?
这是错误消息,看起来它正在尝试在错误的目录中找到该文件:
谢谢!
以上是脚本宝典为你收集整理的使用SwiftMailer和PHP检索要附加到电子邮件的文件名全部内容,希望文章能够帮你解决使用SwiftMailer和PHP检索要附加到电子邮件的文件名所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。