Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

×Ô¼ºÐ´µÄÒ»¸öPHP·ÖÒ³Àà

Ïȸø´ó¼ÒÌùÒ»¸öʵÀý
test.php
<?php
//°üº¬seppageÀàÎļþ
require 'seppage.class.php';
//µ±Ç°Ò³Âë
$pagenow=2;
//Ò³Ãæ×ÜÊý
$pageall=10;
/*
*ÐèÒª·ÖÒ³µÄURLµØÖ·£¬¿ÉÒÔURLÖпÉÒÔ×ÔÓÉʹÓÃ?ºÅ»òÕß&ºÅ£¬³ÌÐò»á×Ô¶¯Ê¶±ð
*´Ë²ÎÊýºÍ$modurl²ÎÊýÉèÖÃÒ»Ïî¼´¿É£¬ÈôÁ½Ïî¶¼ÓУ¬Ôò°´$modurlΪ׼
*/
$url='http://localhost/test.php';
/*URL
×Ö·û´®Ä£ÐÍ£¬<{page_num}>ÊǸ³ÖµÒ³ÂëµÄµØ·½
*±ÈÈçÀý×ÓÖеÄURLµØÖ·×îÖÕ»á±»Ìæ»»³Éhttp://localhost
/test.php?pagenum=1ÕâÑùµÄ¸ñʽ£¬¸Ã²ÎÊýÖ÷ҪΪAJAX·ÖÒ³¶ø×¼±¸
*Ò²¾ÍÊÇ˵¿ÉÒÔ½«<{page_num}>Ìæ»»³É
javascript:alert(333)Ö®ÀàµÄJS´úÂë
*/
$modurl='http://localhost/test.php?pagenum=<{page_num}>';
//ÊÇ·ñÏÔʾÊý×ÖÒ³Â룬1ΪÏÔʾ£¬0Ϊ²»ÏÔʾ£¬Ä¬ÈÏÏÔʾ
$shownumlist=1;
//Èç¹ûÏÔʾÊý×ÖÒ³Â룬ÄǸòÎÊýÔòÉèÖÃÒ³ÂëÊýÁ¿
$pagelistnum=5;
//ʵÀý»¯¶ÔÏó
$sep=new seppage($pagenow,$pageall,$url,$modurl,$shownumlist,$pagelistnum);
?>
<link rel="stylesheet" href='pagenav.css' />//¼ÓÔØpagenav.cssÎļþ
<div class="pagenav">
<?php
    $sep->shownav();
?>
</div>
¼òµ¥°É£¿
ÏÂÃæÊÇÀàÎļþ´úÂ룬²»ÖªµÀÔõô´«¸½¼þ£¬´ó¼Ò×Ô¼º¸³ÖµÕ³Ìùһϰɣ¬ÎļþÃûΪseppage.class.php
<?php
class seppage {
   
    public $pagenow;
    public $pageall;
    public $url;
    public $listnumber;
    public $add;
    public $shownumlist;
    public $modelurl;
   
    function __construct($pagenow, $pageall, $url='',$modelurl ='', $shownumlist = 1, $listnumber = 5) {
        $this->pagenow = $pagenow>1?$pagenow:1;
        $this->pageall = $pageall;
        $this->shownumlist = $shownumlist;
        $this->url = ! $modelurl ? $url : $modelurl;
        $this->listnumber = $listnumber;
 &nbs


Ïà¹ØÎĵµ£º

¶¨Òåphp³£Á¿

³£Á¿¿ÉÒÔÀí½âΪֵ²»±äµÄ±äÁ¿¡£³£Á¿Öµ±»¶¨Òåºó£¬Ôڽű¾µÄÆäËûÈκεط½¶¼²»Äܱ»¸Ä±ä¡£Ò»¸ö³£Á¿ÓÉÓ¢ÎÄ×Öĸ¡¢Ï»®Ïß¡¢ºÍÊý×Ö×é³É£¬µ«  Êý×Ö²»ÄÜ×÷ΪÊ××Öĸ³öÏÖ¡£
ÔÚphpÖÐʹÓÃdefaine()º¯ÊýÀ´¶¨Òå³£Á¿£¬¸Ãº¯ÊýµÄÓï·¨¸ñʽΪ£º
define(string constant_name, mixed value, case_sensitive = true)
¸Ãº¯ÊýÓÐ3¸ö²ÎÊý£º
cons ......

PHP»á»°(Session)ʹÓÃÈëÃÅ


¡¡¡¡¶Ô±ÈÆð Cookie£¬Session ÊÇ´æ´¢ÔÚ·þÎñÆ÷¶ËµÄ»á»°£¬Ïà¶Ô°²È«£¬²¢ÇÒ²»Ïñ Cookie ÄÇÑùÓд洢³¤¶ÈÏÞÖÆ£¬±¾Îļòµ¥½éÉÜ Session µÄʹÓá£
¡¡¡¡ÓÉÓÚ Session ÊÇÒÔÎı¾ÎļþÐÎʽ´æ´¢ÔÚ·þÎñÆ÷¶ËµÄ£¬ËùÒÔ²»Å¿ͻ§¶ËÐÞ¸Ä Session ÄÚÈÝ¡£Êµ¼ÊÉÏÔÚ·þÎñÆ÷¶ËµÄ Session Îļþ£¬PHP ×Ô¶¯ÐÞ¸Ä Session ÎļþµÄȨÏÞ£¬Ö»±£ÁôÁËϵͳ¶ÁºÍдȨ ......

phpÖеĵ±Ç°ÍøÖ·ºÍ¸ù·¾¶

µ±Ç°ÍøÖ·ÊÇä¯ÀÀÆ÷ÀíÏÔʾµÄÍøÖ·£¬ÊÇÓû§¿´µ½µÄ¡£
¸ù·¾¶ÊÇphpÎļþÔÚ·þÎñÆ÷ÉϵÄ·¾¶£¬ÊÇÕæÊµµÄÎļþ·¾¶¡£
(ÓëjavaÊDz»Ò»ÑùµÄ)
Èç¹ûÓжà²ãincludeÓï¾ä£¬±ØÐëÓøù·¾¶£¬·ñÔò³ö´í¡£
Ìá½»±íµ¥Ê±ÒªÌá½»µ½µ±Ç°ÍøÖ·µÄÏà¶Ô»òÕß¾ø¶ÔµÄÍøÖ·ÀïÃæ¡£
---------------------------------------------------------------------
Ò»¸öÊÇÍ ......

PHP ±äÁ¿ºÍ³£Á¿µÄ¶¨Òå

±¾ÕÂ˵˵±äÁ¿µÄ¶¨Òå¡£
Èç¹û¶ÔÓÚ±äÁ¿ºÍ³£Á¿µÄ¶¨Ò壬Äã»á×¢Ò⼸¸ö·½ÃæÄØ£¿Äã¿ÉÄÜ»áÏëµ½£º
ÈçºÎ¶¨Òå±äÁ¿£¬ËüºÍC# µÈÓïÑÔÓÐʲô²»Í¬ÄØ£¿
±äÁ¿Çø·Ö´óСдÂð£¿
PHPµÄ±äÁ¿»¹ÓÐÆäËûÖØÒªµÄÂð£¿
³£Á¿ºÍ±äÁ¿µÄ¶¨ÒåÒ»ÑùÂð£¿
 ·Ö±ð½²Êö°É¡£
1.ÈçºÎ¶¨Òå±äÁ¿£¬ËüºÍC# µÈÓïÑÔÓÐʲô²»Í¬ÄØ£¿
   PHP ÖеıäÁ¿ÓÃÒ»¸ ......

¹ØÓÚPHP Pear °²×°¼°Ê¹ÓÃ


£­£­£­£­£­£­£­£­£­£­£­£­£­£­
           °²×°pear
£­£­£­£­£­£­£­£­£­£­£­£­£­£­
pearÊÇPHPµÄÀ©Õ¹ºÍÓ¦ÓóÌÐò¿â£¬°üº¬Á˺ܶàÓÐÓõÄÀ࣬°²×°ºÃphp5.0ºó£¬pearʵ¼ÊÉϲ¢Ã»Óб»°²×°£¬°²×°µÄ·½·¨ÈçÏ£º
1.ÔÚphpĿ¼ÖÐË«»÷go-pear.bat¡£
2.°´ÕÕÌáʾÊäÈëһЩÉèÖÃÐÅÏ¢£¬ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ