phpÐÂÎÅÄÚÈÝ·ÖҳʵÀý£¨smarty Ä£°å£©
ÏîÄ¿ÐèÒªÓõ½ ÐÂÎÅÄÚÈÝÒ³ ʵÏÖ·ÖÒ³¹¦ÄÜ£¬Ëæ±ãдÁËһϡ£
¸ø´ó¼Ò×ö¸ö²Î¿¼£¬Ð´µÄ²»ºÃ»¹ÍûÁ½Ⱑ£¡
//ÐÂÎÅÄÚÈÝ·ÖÒ³¿ªÊ¼ The page next for news content start
$nextpage="<!--{nextpage}-->";//·ÖÒ³±êʾ.
$content=explode($nextpage,$content);
$sum=count($content);
$mpurl=$_SERVER['PHP_SELF']."?newsid=$newsid";//µ±Ç°Ò³µØÖ·
if ($sum==1)
{
$smt->assign("content",$content[0]); //ûÓзÖÒ³µÄÇé¿öÏÂ
$news_page="¹²".$sum."Ò³";
}
else
{
$page=$_GET['page'];
if(!$page)
{
$page=0;
for($i=2;$i<=$sum;$i++)
{
$multipage .= '<a href="'.$mpurl.'&page='.$i.'" mce_href="'.$mpurl.'&page='.$i.'">['.$i.']</a> ';
}
$smt->assign("content",$content[$page]);
$news_page="¹²".$sum."Ò³ [<font style="color:#FF3300" mce_style="color:#FF3300">1</font>] ".$multipage." <a href=".$mpurl.'&page='.$sum." mce_href=".$mpurl.'&page='.$sum.">βҳ</a>";
}
else
{ $currentpage=$page-1;
$next=$currentpage+2;//ÉèÖÃÏÂÒ»Ò³
$prev=$page-1;//·µ»ØÉÏÒ»Ò³
for($i=1;$i<=$sum;$i++)
{
$multipage.=$i==$page?'[<font style="color:#FF3300" mce_style="color:#FF3300">'.$i.'</font>] ':'<a href="'.$mpurl.'&page='.$i.'" mce_href="'.$mpurl.'&page='.$i.'">['.$i.']</a> ';
}
if(($page<$sum)&&($page>1)){
$news_page="¹²".$sum."Ò³ <a href=".$mpurl.'&page='.$prev." mce_href=".$mpurl.'&page='.$prev.">ÉÏÒ»Ò³</a> ".$multipage." <a href=".$mpurl.'&page='.$next." mce_href=".$mpurl.'&page='.$next.">ÏÂÒ»Ò³</a>";
}
elseif($page==$sum){
$news_page="¹²".$sum."Ò³ ".$multipage." βҳ";
}
else{
$news_page="¹²".$sum."Ò³ ".$multipage." <a href=".$mpurl.'&page='.$next." mce_href=".$mpurl.'&page='.$next.">ÏÂÒ»Ò³</a>";
}
$smt->assign("content",$cont
Ïà¹ØÎĵµ£º
Éý»ªÌṩÖÕÉíÃâ·ÑASP+access PHP+mysqlÐéÄâÖ÷»ú
Ò»£ºÉý»ªÍøÂç¿Æ¼¼ÓÐÏÞ¹«Ë¾,ÓëÉý»ªÍ¬ÔÚÕ¾³¤ÖÕÉíÃâ·Ñ¿Õ¼ä·ö³Ö¼Æ»®.
1¡¢×ð¾´µÄÓû§ÄúºÃ,Ò²ÐíÄú»¹ÔÚΪÿÄêÒ»½»µÄ¿Õ¼ä·ÑÓ÷¢³î,Ò²ÐíÄúÏë»ñµÃÒ»¸ö¸üÓÅÖʵĿռäÈ´²»ÏëͶÈëÌ«¶à,´ÓÏÖÔÚÆð ÕâЩÎÊÌ⽫ÓÈжø½â→Éý»ªÍøÂç←ÓëÉý»ªÍ¬ÔÚÕ¾³¤·ö³Ö¼Æ»®È«ÃæÆô¶¯¡£
2¡¢Ã»ÓÐ×¢²á¹«Ë¾ ......
1. Windows XP »·¾³Ï°²×° Apache HTTP Server 2.2.8
¸ÃÕ½ڽ²ÊöÈçºÎÔÚ Windows XP »·¾³Ï°²×° Apache HTTP Server¡£
ÏÂÔØ Apache HTTP Server 2.2.8
Apache µÄ¹Ù·½ÍøÕ¾ÊÇ http://apache.org/¡£
Apache HTTP Server µÄÏÂÔØÒ³ÃæÊÇ http://httpd.apache.org/download.cgi£¬¸ÃÒ³ÖлáÌáʾÄã¿É¹©ÏÂÔصľ ......
ËäÈ»ÏÂÃæµÄ¶«Î÷ÊÇÕë¶ÔPHP¿ª·¢ÈËԱ˵µÄ£¬ÆäʵºÜ¶àÔÔò¶¼ÊÇͨÓõģ¬ASP.NET,JSP¿ª·¢ÈËÔ±Ò²Ò»Ñù¿ÉÒÔ²ÎÕÕ£¡ ÌùÔÚÕâÀïºÍ´ó¼Ò¹²Ã㣡
ÎÄ×÷ÕߣºReinhold Weber
ÔÎÄÁ´½Ó£º40 signs you really are a lousy PHP programmer
ÒëÕߣºdavidkoree
40¸ö¼£Ïó±íÃ÷Ä㻹ÊÇPHP²ËÄñ
ÎÒÔ¸Òâ°Ñ±¾ÎĹéÈëÎҵē±à³ÌôÜÊ”ϵÁС£¾¡¹ÜÔÚ ......
¡¡¡¡Ñ§Ï°Ä¿µÄ£ºÑ§»áÌí¼Óɾ³ýÐÞ¸ÄÊý¾Ý
¡¡¡¡mysql_query($exec);
¡¡¡¡µ¥Õâ¸öÓï¾ä¾Í¿ÉÒÔÖ´ÐÐËùÓеIJÙ×÷ÁË£¬²»Í¬µÄ¾ÍÊÇ$execÕâ¸ösqlÓï¾ä
¡¡¡¡Ìí¼Ó£º$exec="insert into tablename (item1,item2) values ('".$_POST['item1']."',".$_POST['item1'].")";
¡¡¡¡É¾³ý£º$exec="delete from tablename where...";
¡¡¡¡ÐÞ¸ ......
ѧϰĿµÄ£º×öÒ»¸ö·ÖÒ³ÏÔʾ
¡¡¡¡¹Ø¼ü¾ÍÊÇÓõ½ÁËSQLÓï¾äÖеÄlimitÀ´ÏÞ¶¨ÏÔʾµÄ¼Ç¼´Ó¼¸µ½¼¸¡£ÎÒÃÇÐèÒªÒ»¸ö¼Ç¼µ±Ç°Ò³µÄ±äÁ¿$page£¬»¹ÐèÒª×ܹ²µÄ¼Ç¼Êý$num
¡¡¡¡¶ÔÓÚ$pageÈç¹ûûÓÐÎÒÃǾÍÈÃËü=0£¬Èç¹ûÓÐ<0¾ÍÈÃËüÒ²=0£¬Èç¹û³¬¹ýÁË×ܵÄÒ³Êý¾ÍÈÃËû=×ܵÄÒ³Êý¡£
¡¡¡¡$execc="select count(*) from tablename ";
¡¡¡¡$re ......