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

³¬Ç¿PHP·ÖÒ³Àà

ʵÀýÓ¦Óãº
1<?
2require_once('../libs/classes/page.class.php');
3$page=new page(array('total'=>1000,'perpage'=>20));
4echo 'mode:1<br>'.$page->show();
5echo '<hr>mode:2<br>'.$page->show(2);
6echo '<hr>mode:3<br>'.$page->show(3);
7echo '<hr>mode:4<br>'.$page->show(4);
8echo '<hr>¿ªÊ¼AJAXģʽ:';
9$ajaxpage=new page(array('total'=>1000,'perpage'=>20,'ajax'=>'ajax_page','page_name'=>'test'));
10echo 'mode:1<br>'.$ajaxpage->show();
11?>
12
13
  1<?
2/**
3 * filename: ext_page.class.php
4 * @package:phpbean
5 * @author :feifengxlq<feifengxlq#gmail.com><[url=http://www.phpobject.net/]http://www.phpobject.net/[/url]>
6 * @copyright :Copyright 2006 feifengxlq
7 * @license:version 2.0
8 * @create:2006-5-31
9 * @modify:2006-6-1
10 * @modify:feifengxlq 2006-11-4
11 * description:³¬Ç¿·ÖÒ³À࣬ËÄÖÖ·Öҳģʽ£¬Ä¬ÈϲÉÓÃÀàËÆbaidu,googleµÄ·ÖÒ³·ç¸ñ¡£
12 * 2.0Ôö¼Ó¹¦ÄÜ£ºÖ§³Ö×Ô¶¨Òå·ç¸ñ£¬×Ô¶¨ÒåÑùʽ£¬Í¬Ê±Ö§³ÖPHP4ºÍPHP5,
13 * to see detail,please visit [url=http://www.phpobject.net/blog/read.php]http://www.phpobject.net/blog/read.php[/url]?
14 * example:
15 * ģʽËÄÖÖ·Öҳģʽ£º
16 require_once('../libs/classes/page.class.php');
17 $page=new page(array('total'=>1000,'perpage'=>20));
18 echo 'mode:1<br>'.$page->show();
19 echo '<hr>mode:2<br>'.$page->show(2);
20 echo '<hr>mode:3<br>'.$page->show(3);
21 echo '<hr>mode:4<br>'.$page->show(4);
22 ¿ªÆôAJAX£º
23 $ajaxpage=new page(array('total'=>1000,'perpage'=>20,'ajax'=>'ajax_page','page_name'=>'test'));
24 echo 'mode:1<br>'.$ajaxpage->show();
25 ²ÉÓü̳Ð×Ô¶¨Òå·ÖÒ³ÏÔʾģʽ£º
26 demo:http://www.phpobject.net/blog
27 */
28class page
29{
30 /**
31 * config ,public
32 */
33 var $page_name="PB_page";//page±êÇ©£¬ÓÃÀ´¿ØÖÆurlÒ³¡£±ÈÈç˵xxx


Ïà¹ØÎĵµ£º

phpÖÐsession¹ýÆÚµ«¼Ç¼²¢²»É¾³ýµÄÔ­Òò


Ç°Ò»ÕóдÁËÒ»¸ö¼òµ¥µÄÀ࣬½«session´æÈëÊý¾Ý¿â£¬µ±session_destroy()ʱ»á½«¿âÖеÄsession¼Ç¼ɾ³ý£¬¶ø¹ýÁËmaxlifetimeʱsession¼Ç¼ȴ»¹ÔÚ£¬µ±Ê±ºÜ²»Àí½â¡£
½ñÌìÓÖ¿´ÁËÏÂphp.ini£¬ÕÒµ½Á˹ØÓÚsessionµÄÅäÖã¬Ã÷°×ÁËÔ­Òò¡£
; Define the probability that the 'garbage collection' process is started
; on every sessi ......

PHP MKTIME

ͻȻÏëÆðÁËÔÚÒ»´ÎÃæÊÔµÄʱºòÒªÎÒд³öδÀ´Ò»ÌìÊÇÐÇÆÚ¼¸£¬µ±Ê±Ã»Óиøд³öÀ´¡£ÏÖÔÚÏëÏ뻹ÊǾõµÃ¶ÔdateºÍmktimeµÄ¸ÅÄîºÜÄ£ºý£¬ÔÚÕâÀï¼Ç¼ÏÂÒÔ±¸ºóÓ㺳ÌÐòÈçÏÂ
<?php
echo date( "l dS 0f F Y h£ºi£ºs A" );
echo "<br>";
print("July 1, 2010 is on a " . date("l", mktime(0,0,0,7,11,2010)));
?>
Êä³ö½á¹û ......

phpÒ³Ãæ¼ä´«Öµ

ÀýÈ磺
A.php
<?php
$usernane
?>
Òª½«A.phpÖصÄ$usernaneÖµ´«¸øÁíÍâÒ»¸öÒ³Ã棨B.php£©ÖеÄʵÏÖ·½·¨£º
<meta   http-equiv='refresh'   content='0;url='B.php£¿user=$username'>   
  ½ÓÊÕ   
  echo   $_GET['user'];
ÕâÑù£¬¾Í¿ÉÒÔÔÚB.phpÖзÃÎÊ$use ......

phpÊÕ¼¯

get_class_methods() // ËùÓз½·¨   
get_included_files()//·µ»Øµ±Ç°Ò³ËùÓмÓÔصÄÎļþ   
get_declared_classes()// ·µ»Øµ±Ç°Ò³ËùÓÐclass   
get_declared_interfaces()// ·µ»ØËùÓеĽӿڠ  
get_defined_functions()// ·µ»ØËùÓеÄfunction &nb ......

php±à³Ì£¬Õë¶ÔMYSQLµÄ²Ù×÷Àà

<?php
/*
*PHP¹ÜÀíMYSQLµÄÊý¾Ý¿âÀà
ʹÓ÷½·¨£º$dbConn = new DbConn([$Êý¾Ý¿âÃû(¿ÉÑ¡)]);
ÔÊÐí·µ»ØµÄ·½·¨£º
Execute($sql) //Ö´ÐÐSQLÓï¾ä£¬Ã»Óзµ»ØÖµ;
getRs($sql) //·µ»Ø²éѯÓï¾äµÄ¼Ç¼£¬Ò»Ìõ;
getRsArray($sql) //·µ» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ