ajaxmailattachment.php
来自「有关ajax的开发方法以及源码,希望对大家有所帮组。」· PHP 代码 · 共 24 行
PHP
24 行
<?php
require_once("inc/config.inc.php");
require_once("inc/pop3lib/pop3.class.php");
require_once("inc/pop3lib/pop3message.class.php");
require_once("inc/pop3lib/pop3header.class.php");
require_once("inc/pop3lib/pop3attachment.class.php");
require_once("inc/AjaxMail.inc.php");
//get information
$id = $_GET["id"];
//create new mailbox
$mailbox = new AjaxMailbox();
//get the attachment
$attachment = $mailbox->getAttachment($id);
//headers
header("Content-Type: $attachment->contentType");
header("Content-Disposition: attachment; filename=$attachment->filename");
//output the body
echo $attachment->data;
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?