PHPÒ³Ãæ·ÖÒ³º¯Êý
ºÜ¾ÃǰЩµÄһЩÎÄÕ£¬ÄÇʱºò¼¼Êõ»¹ÔÚ³õ¼¶½×¶Î£¬ÔÚÏÖÔÚ¿´À´´úÂë¹»Àõģ¬µ«ÊÇÈË×ÜÊÇÒ»²½²½×ßÉÏÀ´µÄ£¬Ï£ÍûÄܸø³õѧÕßÒ»µã¹ÄÀøÁË£¡
<?php
/*********************************************************
filename£ºmulti.php
describe£º ÏÔʾ¶àÓÚÒ»Ò³µÄÁ´½Ó
function£º·ÖÒ³ÏÔʾģ¿é
author£º etongchina@gmail.com
checked£º 2008-02-15 18:05
µ÷Ó÷½Ê½£º
$num:Êý¾Ý¿â×ܼǼÊý
$perpage:ÿҳÏÔʾÌõÊý
$curr_page:µ±Ç°Ò³Âë
$mpurl:Á´½ÓµÄURL
$type:url¸ÄдºóµÄÁ´½Ó
ĬÈϹæÔòΪ£ºµ±Ç°Ò³Âë.htm
*********************************************************/
function multi($num, $perpage, $curr_page, $mpurl,$type = 0) {
$multipage = '';
if(!is_numeric($curr_page) || ( $curr_page < 1 )){
showmessage("ÎÞЧҳÃæ²ÎÊý!");
//×Ô¶¨ÒåµÄÊä³öÌáʾº¯Êý
}
if($type == 1){
$script = '';
}else{
$script = ".htm";
}
if($num > $perpage) {
$page = 6;
$offset = 2;
$pages = ceil($num / $perpage);
if($curr_page > $pages){
showmessage("Äú²é¿´µÄÒ³Ãæ²»´æÔÚ£¡");
}
$from = $curr_page - $offset;
$to = $curr_page + $page - $offset - 1;
if($page > $pages) {
$from = 1; $to = $pages;
}else{
if($from < 1) {
$to = $curr_page + 1 - $from;
$from = 1;
if(($to - $from) < $page && ($to - $from) < $pages) {
$to = $page;
}
}elseif($to > $pages) {
$from = $curr_page - $pages + $to;
$to = $pages;
if(($to - $from) < $page && ($to - $from) < $pages) {
$from = $pages - $page + 1;
}
&nbs
Ïà¹ØÎĵµ£º
TIOBEÊÀ½ç±à³ÌÓïÑÔÅÅÐаñÕ¹ÏÖÁ˱à³ÌÓïÑÔµÄÁ÷ÐÐÇ÷ÊÆ¡£Ã¿¸öÔ£¬¶¼ÓÐ×îеÄÊý¾Ý±»¸üС£Õâ·ÝÅÅÐаñµÄÊý¾ÝÈ¡ÑùÀ´Ô´ÓÚ»¥ÁªÍøÉϸ»ÓоÑéµÄ³ÌÐòÔ±¡¢ÉÌ ÒµÓ¦Óá¢ÖøÃûµÄËÑË÷ÒýÇ棨ÖîÈç¹È¸è¡¢ MSN ¡¢ÑÅ»¢£©µÄ¹Ø¼ü×ÖÅÅÃû¡¢ Alexa ÉϵÄÅÅÃûµÈ¡£Çë×¢ÒâÕâ¸öÅÅÐаñÖ»ÊÇ·´Ó³ÁËij¸ö±à³ÌÓïÑÔµÄÈÈÃÅ³Ì¶È , Õâ²¢²»´ú±íËüÊÇÒ»¸ö×îºÃµÄ±à³ÌÓïÑÔ»òÊ ......
get_class_methods() // ËùÓз½·¨
get_included_files()//·µ»Øµ±Ç°Ò³ËùÓмÓÔصÄÎļþ
get_declared_classes()// ·µ»Øµ±Ç°Ò³ËùÓÐclass
get_declared_interfaces()// ·µ»ØËùÓеĽӿÚ
get_defined_functions()// ·µ»ØËùÓеÄfunction &nb ......
ÓÉÓÚijÖÖÐèÒª£¬ÕâÒ»¶ÎÐèҪѧϰPHP£¬ËùÒÔÔÚÕâÀà¼Ç¼һÏÂ×Ô¼ºµÄһЩÐĵúÍ×Ô¼ºÔÚѧϰÖÐÓöµ½µÄһЩÎÊÌâ¡££¨¸üÐÂÖÐ...£©
1.LinuxºÍwindowsÏ¿ª·¢PHP
ÔÚÕâÁ½ÖÖϵͳÏ¿ª·¢PHP¶¼ÐèÒª´î½¨»·¾³£¬ÔÚLinuxÏÂÒ»°æÓÃapache×÷Ϊweb·þÎñÆ÷£¬¶øÇÒÏà¶ÔÀ´Ëµ»·¾³µÄ´î½¨ºÜ¼òµ¥£»¶øÔÚwindowsÏÂÒªÊÇ¿ª·¢PHP½¨ÒéÓÃwindows server 2003£¬windows x ......
phpÊÇÒ»ÖÖ¿ª·ÅÔ´´úÂ롢ǶÈëʽ·þÎñÆ÷¶ËµÄ½Å±¾ÓïÑÔ¡£
1¡¢PHPÒ²ÊÇǶÈëʽCGIÓïÑÔ¡£PHP4ÊDZ»·â×°ÔÚ±ê¼ÇÖеÄǶÈëʽÓïÑÔ£¬Äã¿ÉÒÔÇáÒ×µØÔÚPHPºÍHTMLÖ®¼ä½øÐÐת»»£¬¶ø²»±ØʹÓôóÁ¿´úÂëÒÔÊä³öHTML¡£Í¨ÓÃÍø¹Ø½Ó¿Ú(CGI)ÔÊÐíÓû§±àдÄܲúÉúHTMLÒÔ¼°¶¯Ì¬´¦ÀíÍøÒ³Êý¾ÝµÄ¼ÆËã»ú³ÌÐò¡£PHP¿ÉÒÔ±»¹éÀàΪCGI¡£
2¡¢Ó¦ÓÃPHPµÄÈý¸öÁìÓò£º(1)·þÎñÆ ......