Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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×Ö·û´®º¯Êý´óÈ«

AddSlashes: ×Ö·û´®¼ÓÈëбÏß¡£
bin2hex: ¶þ½øλת³ÉÊ®Áù½øλ¡£
Chop: È¥³ýÁ¬Ðø¿Õ°×¡£
Chr: ·µ»ØÐòÊýÖµµÄ×Ö·û¡£
chunk_split: ½«×Ö·û´®·Ö³ÉС¶Î¡£
convert_cyr_string: ת»»¹Å˹À­·ò×Ö·û´®³ÉÆäËü×Ö·û´®¡£
crypt: ½«×Ö·û´®Óà DES ±àÂë¼ÓÃÜ¡£
echo: Êä³ö×Ö·û´®¡£
explode: Çпª×Ö·û´®¡£
flush: Çå³öÊä³ö»º³åÇø¡£
get ......

PHPÖÐ__autoload()º¯ÊýµÄʹÓÃ


ÎÒÃÇÖªµÀÔÚPHP4ÀïÃ棬µ±ÎÒÃÇʹÓÃÒ»¸öÀàµÄʱºò£¬±ØÐ뽫¸ÃÀàËùÒÔÎļþʹÓÃinclude»òrequire¼Ó½øÀ´£¬ÕâÑùÎÒÃǾͿÉÒÔʹÓÃÀàÁË¡£
¶ø¶ÔÓÚPHP5À´ËµÒ²¿ÉÒÔʹÓÃÔÚPHP4ÀïÃæµÄ·½Ê½£¬½«ÀàÎļþ°ü½øÀ´£¬µ«µ±ÓÐÁË__autoloadÖ®ºó£¬ÕâÖÖÇé¿ö¾Í¿ÉÒÔ¿¿±àд¹æÔòҲʵÏÖ¡£
ÒÔÏ´úÂ룺
<?php 
$obj_A = new clsA(); 
......

PHP±äÁ¿

ºÍºÜ¶àÓïÑÔ²»Í¬£¬ÔÚPHPÖÐʹÓñäÁ¿Ö®Ç°²»ÐèÒªÉùÃ÷£¬Ö»ÐèҪΪ±äÁ¿¸³Öµ¼´¿É£¬PHPÖеıäÁ¿Ãû³ÆÓÃ$ºÍ±êʶ·û±íʾ,±äÁ¿ÃûÊÇÇø±ð´óСдµÄ¡£
±äÁ¿¸³Öµ£¬ÊÇÖ¸¸ø±äÁ¿Ò»¸ö¾ßÌåµÄÊý¾ÝÊý¾ÝÖµ£¬¶ÔÓÚ×Ö·û´®ºÍÊý×ÖÀàÐ͵ıäÁ¿£¬¿ÉÒÔͨ¹ý"="À´ÊµÏÖ¡£
³ýÁËÖ±½Ó¸³ÖµÍâ,»¹ÓÐÁ½ÖÖ·½Ê½À´¸ø±äÁ¿ÉùÃ÷»ò¸³Öµ¡£Ò»ÖÖÊDZäÁ¿¼äµÄ¸³Öµ¡£ÁíÒ»ÖÖÊÇÒýÓø³Öµ¡£ ......

PHP³£ÓÃ×Ö·û´®º¯ÊýÊÕ¼¯£¨60¸ö£©

1¡¢AddcSlashes ×Ö·û´®¼ÓÈ뷴бÏß
Óï·¨£ºstring addcslashes(string str,string charlist);
2¡¢AddSlashes ×Ö·û´®¼ÓÈ뷴бÏß
Óï·¨£ºstring addslashes(string str);
ÔÚÌض¨µÄ×Ö·ûÇ°¼Ó·´Ð±Ïߣº'¡¢"¡¢\¡¢NULL
3¡¢bin2hex ½«¶þ½øλת³ÉÊ®Áù½øλ
Óï·¨£ºstring bin2hex(string str);
4¡¢Chop È¥³ýÁ¬Ðø¿Õ°×,ͬrtrim()
Óï· ......

ʲôÊÇPHPÀàºÍÀàµÄ¶ÔÏó(PHPµÄÀà¼ò½é)

 
ÀࣨClass£©£ºÊÇһЩ±äÁ¿ÓëһЩʹÓÃÕâЩ±äÁ¿µÄº¯ÊýµÄ¼¯ºÏ¡£
¿É¼òµ¥Àí½âΪº¯ÊýºÍ±äÁ¿µÄ¼¯ºÏ£¬»ò±äÁ¿ºÍº¯ÊýµÄ¶¨ÒåµÄ¼¯ºÏ¡£
Óï·¨ÊÇ£º
class Class_name //Ï°¹ßÉÏÀàµÄµÚÒ»¸ö×Ö·ûΪ´óд£¬²¢ÇÒ±ØÐë·ûºÏ±äÁ¿µÄÃüÃû¹æÔò¡£
{
//º¯ÊýÓë±äÁ¿µÄ¼¯ºÏ(һЩ±äÁ¿(Àà³ÉÔ±)ºÍº¯Êý(ÐÐΪ·½·¨)µÄ¶¨Òå)¡£
}
Êý¾Ý³ÉÔ±(±äÁ¿)ÔÚÀ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ