請PHP高手幫小弟我個修改一下,被全功能。多謝

來源:互聯網
上載者:User
請PHP高手幫我個修改一下,被全功能。謝謝
程式分3個功能
1。頁面開啟隨機播放30後顯示。(沒有問題)
2。查詢功能(如s2)(比如這裡輸入一個很短的字。全顯示非常多的數庫。我想在這裡只顯示30條。)
3。顯示單個頁面(如s3) (想在這個下面在加一個根首頁一樣的隨機播放30條。)


PHP code
";                $pf_l .= '';                $pf_l .= ''.$detail[0].'
'; if(fmod($r_num,$lan)+1==$lan) $pf_l .= ""; $r_num++; break; } } } $pf_l = '腦筋急轉彎大全:找到 '.$prescription.' 的相關'.$r_num.'個'.$pf_l.'
 

';}elseif($id>0){ $dreamdb=file("date/njjzw.dat");//讀取庫 $count=count($dreamdb);//計算行數 $detail=explode("\t",$dreamdb[$id-1]); $pf = '腦筋急轉彎大全 /腦筋急轉彎問題'; $pf .= '

腦筋急轉彎:'.$detail[0].'http://www.vipcha.net/naojinjizhuanwan/Mjcx.html

答案:'.$detail[1].'

查看答案

';}else{ $dreamdb=file("date/njjzw.dat");//讀取庫 $count=count($dreamdb);//計算行數 $pfl = rand(0,intval($count/30)); for($i=$pfl*30; $i<$pfl*30+30; $i++) { if($i>=$count-1) break; $detail=explode("\t",$dreamdb[$i]); if(fmod($r_num,$lan)==0) $pf_l .= ""; $pf_l .= ''; $pf_l .= ''.$detail[0].'
'; if(fmod($r_num,$lan)+1==$lan) $pf_l .= ""; $r_num++; } $pf_l = '推薦腦筋急轉彎大全'.$r_num.'個'.$pf_l.'
 

';}?>腦筋急轉彎0 && $id<=$count){ echo $pf;}else{ echo $pf_l;}?>
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.