全球主机交流论坛

标题: 我这段代码为什么不会自动转向到下一页的。。 [打印本页]

作者: nr05    时间: 2011-12-24 17:28
标题: 我这段代码为什么不会自动转向到下一页的。。
  1. <?php
  2. set_time_limit(0);
  3. include_once (dirname(__FILE__)."/conn.php");
  4. include_once (dirname(__FILE__)."/inc.php");
  5. $web = "7k7k";
  6.         if(isset($_GET['t'])){
  7.         $t=$_GET['t'];
  8.         $next=$t + 1;
  9.         }else{
  10.                 $t='1';
  11.                 $next=$t + 1;
  12.         }

  13. if (is_file($t.".txt") == false) {
  14. die('导入完毕'); }else{
  15. $contents=file_get_contents($t.".txt");
  16. $temp = explode("\r\n",$contents);
  17.                         foreach($temp as $ID=>$tmp)
  18.                         {
  19.                                 $userinfo=explode(" ",$tmp);
  20.                                 if($userinfo[0] != '' && $userinfo[1] != ''){
  21.                                         add_user($userinfo[0],$userinfo[1],$web);
  22.                                 }
  23.                                 flush();
  24.                                 ob_flush();
  25.                                 usleep(20000);
  26.                         }
  27. }
  28. header('Location: index.php?t='.$next);
  29. ?>
复制代码

作者: 汉陈帝国    时间: 2011-12-24 17:35
因为不对
作者: nr05    时间: 2011-12-24 17:36
我正在把人人的入库 他不自动转向 我一个一个来 多不方便。。
作者: l22576283    时间: 2011-12-24 17:38
http://www.oschina.net/code/snippet_80475_7806

楼主玩PHP可以参考这个
作者: nr05    时间: 2011-12-24 17:42
小VPS 玩不起那么大的。 只能分割文本玩了。。
作者: 随风舞    时间: 2011-12-24 17:52
多测试几次啊....




欢迎光临 全球主机交流论坛 (https://lilynana.eu.org/) Powered by Discuz! X3.4