当前位置: 首页>>代码示例>>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;未经允许,请勿转载。