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


PHP tar::addPosFile方法代碼示例

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


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

示例1: header

 } else {
     $where_sql = '';
 }
 //$tablename=$old_game?$cfg['tb_oldgames']:$cfg['tb_games'];
 //$sql="SELECT * FROM `$cfg[tb_games]` $where_sql ORDER BY gid DESC LIMIT";
 //echo "$row[0]";
 if ($packdown) {
     require_once './include/tar.class.php';
     header("Content-type: /tar.gz");
     $filename = md5(uniqid(rand()));
     header("Content-Disposition: attachment; filename={$filename}.tar.gz");
     $tar = new tar();
     $sql = "SELECT * FROM `{$cfg['tb_games']}` {$where_sql}";
     $result = RenDB_Query($sql);
     while ($gdata = RenDB_Fetch_Array($result)) {
         $tar->addPosFile($gdata);
     }
     $tar->addInfo('Generated by RBB, ' . TimeToDate(time(), true));
     $tar->echoTar();
 } else {
     SetNoUseCache();
     $sql = "SELECT COUNT(*) FROM `{$cfg['tb_games']}` {$where_sql}";
     $result = RenDB_Query($sql);
     $row = RenDB_Fetch_Row($result);
     if (!isset($page)) {
         $page = 1;
     }
     $page = intval($page);
     $encodename = urlencode($u_name);
     $pageinfo = MakePageBar("g_search.php?action=list&rules={$rules}&search_time={$search_time}&opening={$opening}&search_all_user={$search_all_user}&u_name={$encodename}&game_status={$game_status}&cp_id={$cp_id}&group_id={$group_id}", $row[0], $cfg['gperpage'], $page);
     $packdownlink = $row[0] ? "[<a href=\"g_search.php?action=list&rules={$rules}&search_time={$search_time}&opening={$opening}&search_all_user={$search_all_user}&u_name={$encodename}&game_status={$game_status}&cp_id={$cp_id}&group_id={$group_id}&packdown=1\">全部打包下載</a>]" : '';
開發者ID:BGCX261,項目名稱:zjrenju-svn-to-git,代碼行數:31,代碼來源:g_search.php


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