當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Attachments::getAttachFileName方法代碼示例

本文整理匯總了PHP中Attachments::getAttachFileName方法的典型用法代碼示例。如果您正苦於以下問題:PHP Attachments::getAttachFileName方法的具體用法?PHP Attachments::getAttachFileName怎麽用?PHP Attachments::getAttachFileName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Attachments的用法示例。


在下文中一共展示了Attachments::getAttachFileName方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: trim

if (isset($_GET['do'])) {
    $do = trim($_GET['do']);
    switch ($do) {
        case "download":
            uses("attachment");
            $attachment = new Attachments();
            if (empty($_GET['aid'])) {
                flash();
            }
            $attach_id = intval($_GET['aid']);
            if (empty($attach_id)) {
                flash();
            }
            require LIB_PATH . "func.download.php";
            require CLASS_PATH . "js.class.php";
            $filename = $attachment->getAttachFileName($attach_id);
            $filename = $attachment->file_url;
            if (!sendFile($filename)) {
                exit('Error occured when get files.');
            } else {
                JS::Close();
            }
            break;
        default:
            break;
    }
}
if (empty($_GET['id'])) {
    $picture_src = URL . STATICURL . "images/watermark.png";
}
if (isset($_GET['source'])) {
開發者ID:reboxhost,項目名稱:phpb2b,代碼行數:31,代碼來源:misc.php

示例2: trim

if (isset($_GET['do'])) {
    $do = trim($_GET['do']);
    switch ($do) {
        case "download":
            uses("attachment");
            $attachment = new Attachments();
            if (empty($_GET['aid'])) {
                flash();
            }
            $attach_id = authcode(rawurldecode($_GET['aid']), "DECODE");
            if (empty($attach_id)) {
                flash();
            }
            require LIB_PATH . "func.download.php";
            require LIB_PATH . "js.class.php";
            $filename = rawurlencode($attachment->getAttachFileName($attach_id));
            $filename = $attachment->file_url;
            if (!sendFile($filename)) {
                exit('Error occured when get files.');
            } else {
                JS::Close();
            }
            break;
        default:
            break;
    }
}
if (empty($_GET['id'])) {
    $picture_src = URL . "images/watermark.png";
}
if (isset($_GET['source'])) {
開發者ID:renduples,項目名稱:alibtob,代碼行數:31,代碼來源:misc.php

示例3: flash

     if ($status != 1) {
         flash("Bạn chưa thanh toán thành công, nên không thể tải game về máy", "content.php?id=" . $pid, 10);
     }
     uses("attachment");
     $attachment = new Attachments();
     if (empty($_GET['aid'])) {
         flash();
     }
     $attach_id = authcode(rawurldecode($_GET['aid']), "DECODE");
     if (empty($attach_id)) {
         flash("File game không tồn tại trên hệ thống!");
     }
     require LIB_PATH . "download.class.php";
     require LIB_PATH . "js.class.php";
     $download = new Downloads('', false);
     $download->attach_filename = rawurlencode($attachment->getAttachFileName($attach_id));
     $filename = "../" . $attachment->file_url;
     if (!$download->downloadfile($filename)) {
         die($download->geterrormsg());
     } else {
         JS::Close();
     }
     break;
 case "charging":
     //Băt đầu charging
     if ($info['iffree'] != 1) {
         if (empty($_SESSION['msisdn'])) {
             flash("Hiện tại hệ thống chưa nhận diện được số thuê bao, nên không thể thanh toán hãy liên hệ với quản trị để biết thông tin chi tiết!", "content.php?id=" . $pid, 10);
         }
         if (isset($_GET['pid'])) {
             $pid = intval($_GET['pid']);
開發者ID:vuong93st,項目名稱:w-game,代碼行數:31,代碼來源:buy.php


注:本文中的Attachments::getAttachFileName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。