Rumah > php教程 > php手册 > PHP超长文本的分页显示

PHP超长文本的分页显示

WBOY
Lepaskan: 2016-06-21 08:52:38
asal
1188 orang telah melayarinya

PHP实现超长文本的分页显示,如下代码:

<ol class="dp-xml">
<li class="alt"><span><span class="tag"></span><span class="tag-name">php</span><span>  </span></span></li>
<li><span>session_start(); </span></li>
<li class="alt"><span> if(isset($_REQUEST['page'])) </span></li>
<li><span> { </span></li>
<li class="alt"><span>   $<span class="attribute">page</span><span> = </span><span class="attribute-value">intval</span><span>($_GET['page']); </span></span></li>
<li><span> } </span></li>
<li class="alt"><span> else </span></li>
<li><span> { </span></li>
<li class="alt"><span>   $<span class="attribute">page</span><span> = </span><span class="attribute-value">1</span><span>; </span></span></li>
<li><span> } </span></li>
<li class="alt"><span> <span class="tag">?></span><span> </span></span></li>
<li><span><span class="tag"><span class="tag-name">html</span><span class="tag">></span><span> </span></span></span></li>
<li class="alt"><span><span class="tag"><span class="tag-name">head</span><span class="tag">></span><span> </span></span></span></li>
<li><span><span class="tag"><span class="tag-name">meta</span><span> </span><span class="attribute">http-equiv</span><span>=</span><span class="attribute-value">"Content-Type"</span><span> </span><span class="attribute">content</span><span>=</span><span class="attribute-value">"text/html; charset=gb2312"</span><span> </span><span class="tag">/></span><span> </span></span></span></li>
<li class="alt"><span><span class="tag"><span class="tag-name">title</span><span class="tag">></span><span>超长文本的分页显示 - www.cxybl.com</span><span class="tag"></span><span class="tag-name">title</span><span class="tag">></span><span> </span></span></span></li>
<li><span><span class="tag"><span class="tag-name">style</span><span> </span><span class="attribute">type</span><span>=</span><span class="attribute-value">"text/css"</span><span class="tag">></span><span> </span></span></span></li>
<li class="alt"><span></span></li>
</ol>
Salin selepas log masuk
Label berkaitan:
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Cadangan popular
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan