已掉线,重新登录

首页 > 绿虎论坛 > 历史版块 > 编程 > PHP > 讨论/求助

标题: 谁能解释一下这个PHP

作者: @Ta

时间: 2012-02-04

点击: 2211

<?php
require_once("./includes/upb.initialize.php");
require_once("./includes/class/upload.class.php");
require_once("./includes/api/usermanagement/authentication.class.php");
$auth = new UPB_Authentication($tdb);
$uploadRec = $tdb->get("uploads", $_GET["upload_id"]);
if($uploadRec !== false)
{
if($auth->access("topic", 'r', $uploadRec[0]["forum_id"], $uploadRec[0]["topic_id"]) == true)
{
$upload = new upload(DB_DIR, 0,$_CONFIG['fileupload_location']);
$upload->getFile((int) $_GET["upload_id"]);
// Update the download count
$upload->edit("uploads", (int) $_GET["upload_id"], array("downloads" => ((int)$upload->file["downloads"] + 1)));
$upload->dumpFile();
}
else 
{
exitPage("You do not have permission to download this file", true);
}
}
else 
{
exitPage("Upload does not exist", true);
}
?>

[隐藏样式|查看源码]


『回复列表(4|隐藏机器人聊天)』

1. 引入太多文件了吧
(/@Ta/2012-02-04 16:53//)

2. 文件不全哎,别人写的类……
(/@Ta/2012-02-04 18:11//)

3. 下载类?
(/@Ta/2012-02-04 18:13//)

4. 不是下载!
(/@Ta/2012-02-04 18:47//)

回复需要登录

8月12日 07:24 星期二

本站由hu60wap6驱动

备案号: 京ICP备18041936号-1