zoukankan      html  css  js  c++  java
  • 跑数据示例一

    <?php 
    $id = isset($_GET['id']) ? intval($_GET['id']) : 0;
    $w = isset($_GET['w']) ? intval($_GET['w']) : 0;
    
    $arr = file('code-'.$w.'.txt');
    
    if (!array_key_exists($id,$arr)){
        echo 'finish protein-'.$w.'-F.txt';
        $w++;
        header("location:http://127.0.0.1/20150115/a.php?w=".$w);
        exit;
    }
    
    $Conn = mysql_connect ( "localhost", "root", "root" ) or die ( "连接服务器失败 !!!" );
    mysql_select_db ( "1111" ) or die ( "选择数据库失败 !!!" );
    
    
    $code = preg_replace('/[
    ]+/','',$arr[$id]);
    $sql = "select product_oldid from product where product_pid = 10 and product_code = '".$code."' 
    and product_hidden = 1 and product_deleted = 0 limit 1"; $rs = mysql_query($sql); while($row = mysql_fetch_array($rs)){ $parr[] = $row; } if (!empty($parr)){ $str = "http://www.cusabio.com/protein-Recombinant_Protein-".$parr[0]['product_oldid']."/"; $str .= " "; } else { $str = " "; } mysql_close($Conn); file_put_contents('enUrl-'.$w.'.txt',$str,FILE_APPEND); ?> <script> function JumpUrl() { location.href='?id=<?php echo ($id+1);?>&w=<?php echo $w;?>'; } setTimeout('JumpUrl()',0); </script>
  • 相关阅读:
    【算法】Manacher算法
    python 02 python入门知识
    python 01:计算机基础知识
    表示数值的字符串
    C++ 迭代器(STL迭代器)iterator详解
    构建乘积数组
    C++ 容器(STL容器)
    数组中重复的数字
    把字符串转换成整数
    十大经典排序算法
  • 原文地址:https://www.cnblogs.com/wuheng1991/p/5197104.html
Copyright © 2011-2022 走看看