php·ÖÒ³º¯Êý
<?php
function page ( $totalPage , $currentPage,$url ,$halfPer=5)
{
$total=$totalPage-1;
$re="<td><a href="\" mce_href="\""$url\" onclick=\"page=prompt('¹²{$totalPage}Ò³\\n×Ô¶¨ÒåÌøתµ½µÚ¼¸Ò³£º','');if(page>0&&page<$total)location.href=this.href+'='+(page-1);return false\">Ìøת</a></td>\n";
$re .= ( $currentPage > 0 )
? "<td><a href="\" mce_href="\""$url=0\">Ê×Ò³</a></td>\n<td><a href="\" mce_href="\""$url=".($currentPage-1)."\">ÉÏÒ»Ò³</a></td>\n"
: "<td>Ê×Ò³</td>\n<td>ÉÏÒ»Ò³</td>\n";
for ( $i = $currentPage - $halfPer,$i > 0 || $i = 0 , $j = $currentPage + $halfPer, $j < $totalPage || $j = $totalPage;$i < $j ;$i++ )
{
$re .= $i == $currentPage
? "<td><b class=currentPage>[" . ( $i + 1 ) . "]</b></td>\n"
: "<td><a href="\" mce_href="\""$url=$i\">" . ( $i + 1 ) . "</a></td>\n";
}
$re .= ( $currentPage < $total )
? "<td><a href="\" mce_href="\""$url=" . ( $currentPage + 1 ) . "\">ÏÂÒ»Ò³</a></td>\n<td><a href="\" mce_href="\""$url=" . ( $total )."\">βҳ</a>\n</td>"
: "<td>ÏÂÒ»Ò³</td>\n<td>βҳ</td>\n";
$re="<table style="text-align:center" mce_style="text-align:center"><tr>$re</tr></table>";
return $re;
}
?>
¾ßÌåʾÀýÓ÷¨ÈçÏ£º
<?php
$totalPage = 100 ; //×Ü·ÖÒ³ÊýÁ¿
$currentPage = @$_GET['page']+0; //µ±Ç°Ò³Âë
$url = "?page"; //·Ö¶øÁ´½Ó
$halfPer = 10; //¶þ·ÖÖ®Ò»µÄÿҳµÄÐÅÏ¢Êý
$imagePath ="images"; //·ÖҳͼƬĿ¼
$pageHtml = page ( $totalPage , $currentPage,$url ,$halfPer,$imagePath);//µ÷Ó÷ÖÒ³º¯Êý
echo $pageHtml ;
?&
Ïà¹ØÎĵµ£º
´Ó2.2Æð SDK ½«È«ÃæÖ§³ÖUTF-8 GB2312 µÈ¶àÖÖ¸ñʽ,Ò»Ì×SDK ¾Í¿ÉÒÔ×ÔÊÊÓ¦ÄúËùÐèÒªµÄ±àÂë,
ÄÚ´øÅäÖÃÎļþ Taoapi_Config.inc.php
×îиüÐÂ
2010-02-25 Ôö¼ÓÁ˱àÂë¸ñʽ×ÔÊÊÓ¦¹¦ÄÜ
2010-02-25 Ôö¼ÓÁËAPIµ÷ÓÃÈÕÖ¾¹¦ÄÜ,ÿÐÐÏ൱ÓÚÒ»´ÎAPIµ÷ÓÃ
2010-02-25 Ôö¼ÓÁË×Ô¶¯Çå³ý»º´æµÄ»úÖÆ
2010-02-25 Ôö¼ÓAPIµ÷Óó¬¹ýÏÞÖÆʱ×Ô¶¯Çл»µ ......
¡¾×ª×Ô¡¿£ºhttp://blog.miaoheguang.tk/archives/11
±»PHPµÄinclude·¾¶ÅªÔÎÁË¡£×Ô¼ºÊÔÑéһͨ£¬×ܽáÈçÏ¡£
¶¨ÒåA=°üº¬Îļþ B=±»A°üº¬µÄÎļþ C=±»B°üº¬µÄÎļþ
Ò²¾ÍÊÇ˵ A °üº¬ B£¬ B°üº¬C
AÖÐÓÐ
Php ´úÂë
require ‘[B·¾¶]‘ //(ÕâÀï µÄrequire¿ÉÒÔ»»³Érequire_once include)
require ‘[B·¾¶]&l ......
<FORM METHOD=POST ACTION="#">
<INPUT TYPE="text" NAME="name">
<INPUT TYPE="submit" value="query" name="sub">
</FORM>
<?php
function getinitial($str)
{
$asc=ord(substr($str,0,1)); //ord()»ñÈ¡ASCII
if ($asc<160) //·ÇÖÐÎÄ
{
if ($asc>=48 ......
ÔÚPHPÖÐʹÓÃÍ·Îļþ£¬»áÉæ¼°Á½¸öº¯Êý£ºinclude()ºÍrequire()¡£ÕâÁ½¸öº¯Êý²î±ðºÜС£¬È´ºÜÖØÒª£¬ËùÒÔÎÒÃÇÒªÈÏÕæÑо¿Ò»Ï¡£
require()º¯Êý¹¤×÷·½Ê½ÓëXSSIÏàÀàËÆ£»²»¹ÜÔÚ³ÌÐòµÄÄĸö²¿·ÖʹÓÃÁËÕâ¸öº¯Êý£¬Ö»ÓгÌÐòÒ»¿ªÊ¼ÔËÐУ¬Í·ÎļþµÄÄÚÈݾͱ»×÷Ϊ³ÌÐò±¾ÉíµÄÒ»²¿·ÖÀ´´¦
Àí¡£Òò´Ë£¬Èç¹ûÄúÔÚÒ»¸öÌõ¼þÅж¨Óï¾äÖÐʹÓÃÁËrequire()º¯Ê ......
<?php
/*
Version: v1.0
CopyRight Davis.z 2010
Creation Date 2010-02-25
----------------------- Table Script ------------------------
CREATE TABLE [dbo].[T_Employee](
[Name] [nvarchar](50) COLLATE Korean_90_CS_AS NOT NULL,
[Age] [nvarchar](5) COLLATE Korean_90_CI_AS NULL,
[ ......