当前位置: 首页>>代码示例>>PHP>>正文


PHP tar::addInfo方法代码示例

本文整理汇总了PHP中tar::addInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP tar::addInfo方法的具体用法?PHP tar::addInfo怎么用?PHP tar::addInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tar的用法示例。


在下文中一共展示了tar::addInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: header

 }
 //$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>]" : '';
     $sql = "SELECT * FROM `{$cfg['tb_games']}` {$where_sql} ORDER BY {$order_sql} LIMIT {$pageinfo['start']},{$cfg['gperpage']}";
     $result = RenDB_Query($sql);
开发者ID:BGCX261,项目名称:zjrenju-svn-to-git,代码行数:31,代码来源:g_search.php


注:本文中的tar::addInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。