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

PHP·ÖÒ³Àà

<?php
/***************************
* Ò»¸ö·Ç³£ÊµÓøöÐԵķÖÒ³Àà *
****************************
*****************************ʵÀý***********************************
 if(!isset($_GET['page'])){$page = 0;}else{$page = $_GET['page'];}
 $pagedemo = new pageclass;
 $pagedemo->set_sql("SELECT * from `demo` ORDER BY `id` DESC");
 $pagedemo->set_params("type=".$type."");
 $pagedemo->set_setpage($page);
 $pagedemo->set_pagesize(10);
 $pagedemo->set_filename("demo.php");
 $pagedemo->set_pagenumber(5);
 $pagedemo->show(); 
 $result=$pagedemo->result;
 $n=0;
  while ($row=mysql_fetch_row($result)){
   $n++;     
    echo "ÄÚÈÝ";
  }
  $pagedemo->showpage();
*******************************************************************/
class pageclass
{
 /****ÉùÃ÷****/
 var $sqlstr,$filename,$params,$initfirstpage;
 var $pagestart,$pagenumber,$pagesize,$i;
 var $firstpage,$prevpage,$nextpage,$lastpage;
 var $totallines,$maxpage,$totalpages,$result;
 var $page,$final,$getpage,$param,$paramlist;
 
 /****¹¹Ô캯Êý****/
 function pageclass()
 {
  $this->set_initfirstpage("½ö´ËÒ»Ò³"); // ÉèÖÃÖ»ÓÐһҳʱÏÔʾµÄÎÄ×Ö£»
  $this->set_setpage(0);                // ÉèÖÃĬÈϵÚһҳΪ0£»
  $this->set_pagesize(10);              // ÉèÖÃĬÈϼǼÊýΪ10£»
  $this->set_params("");                // ÉèÖÃĬÈϲÎÊýÁбíΪ¿Õ£»
  $this->set_pagestart(0);              // ÉèÖÃĬÈÏ·ÖÒ³ÆðʼÊýΪ0£»
  $this->set_pagenumber(5);  &nbs


Ïà¹ØÎĵµ£º

ʹÓÃPHPµÄgd¿â³öÏÖÎÊÌâ

ÎÒʹÓÃWAMP5 version 1.7.4°²×°PHP+Apache+MySQL¼¯³É»·¾³£¬ÔÚµ÷ÊÔÒ»¸ö³ÌÐòʱ£¬ÆäÑéÖ¤Âë²»ÄÜÏÔʾ£¬ÊÔÁ˺öà´Î£¬ÐÞ¸ÄÁ˺ܶàµØ·½Ò²Ã»Äܳɹ¦¡£ÒÑ×öºÃµÄÅäÖÃÈçÏ£º
¢ÙÔÚphpinfÒ³ÃæLoaded Configuration FileºóÃæËùÖ¸¶¨µÄphp.iniÖаÑ;extension=php_gd2.dllÇ°ÃæµÄ;È¥µô¡£
¢ÚÖØÆôÁËApache·þÎñÆ÷¡£
     Âé· ......

phpÊÇʲô£¿

Ô­ÎÄÁ´½Ó£ºhttp://www.phpdo.net/index.php/2010/01/25/29/
ѧϰÁËÒ»¶Îʱ¼äPHP£¬¾õµÃÓеãÊÕ»ñ¡£Ò²Ó¦¸Ã½«Ñ§¹ýµÄ¶«Î÷ÄóöÀ´É¹É¹ÁË£¬²»È»¾Í½»»Ø¸ø¿Î±¾ÁË¡£
PHPÊÇʲôÄØ£¿
PHP£¬Êdz¬¼¶Îı¾Ô¤´¦ÀíÓïÑÔ£¨PHP:Hypertext Preprocessor£©µÄËõд¡£PHP ÊÇÒ»ÖÖ HTML ÄÚǶʽµÄÓïÑÔ£¬ÊÇÒ»ÖÖÔÚ·þÎñÆ÷¶ËÖ´ÐеÄǶÈëHTMLÎĵµµÄ½Å±¾ÓïÑÔ£¬Óï ......

½áºÏʹÓÃPHPºÍRSS£¨×ª£©


ÄÚÈÝÕªÒª£ºRSS ¾ÛºÏ×î½ü·Ç³£Á÷ÐУ¬Òò´ËÖÁÉÙ¶Ô RSS ¼°Æ乤×÷·½Ê½ÓÐËùÁ˽âÊÇÒ»Ãû PHP ¿ª·¢ÈËÔ±µÄÆÈÇÐÐèÒª¡£±¾ÎĽéÉÜÁË RSS »ù´¡ÖªÊ¶¡¢RSS ÖÚ¶àÓÃ;ÖеÄһЩÓÃ;¡¢ÈçºÎʹÓà PHP ´ÓÊý¾Ý¿â´´½¨ RSS ÌáÒª£¬ÒÔ¼°ÈçºÎʹÓà XML_RSS Ä£¿é¶ÁÈ¡ÏÖÓÐ RSS ÌáÒª²¢½«Æäת»»Îª HTML¡£
¡¡¡¡Ê²Ã´£¿ÄúûÌý˵¹ý RSS£¿
¡¡¡¡RSS ¾ÛºÏÊÇ×î³£¼ûµÄ ......

Smarty Ä£°å ´Óphp·ÖÅäµÄ±äÁ¿ Êý×é

index.php:
$smarty = new Smarty;
$smarty->assign('Contacts',
array('555-222-9876',
'zaphod@slartibartfast.com',
array('555-444-3333',
'555-111-1234')));
$smarty->display('index.tpl');
index.tpl:
{$Contacts[0]}<br>
{$Contacts[1]}<br>
{* you can print arrays of arrays ......

ͨÓÃPHP¶¯Ì¬Éú³É¾²Ì¬HTMLÍøÒ³µÄ´úÂë

×î½üÑо¿PHPµÄһЩ¿ª·¢¼¼Êõ£¬·¢ÏÖPHPÓкܶàASPËùûÓеÄÓÅÐ㹦ÄÜ£¬¿ÉÒÔÍê³ÉһЩÒÔÇ°ÎÞ·¨Íê³ÉµÄ¹¦ÄÜ£¬ÀýÈ綯̬Éú³ÉHTML¾²Ì¬Ò³Ã棬ÒÔ¼õÉÙ·þÎñÆ÷CPUµÄ¸ºÔØ£¬Ìá¸ßÓû§·ÃÎʵÄËٶȡ£
¡¡¡¡ÎÒÃÇÖªµÀ£¬PHP¶ÁÈ¡MYSQL¶¯Ì¬ÏÔʾ£¬ÔÚ·ÃÎÊÁ¿´óµÄÇé¿öÏ£¬»áÓкܶàÐÔÄÜÎÊÌ⣬Èç¹û×âÓñðÈ˵ÄÐéÄâÖ÷»ú£¬Ôò»áÒòΪCPUÏûºÄ¹ý¶à¶ø±»ÏÞÖÆCPU£¬µ¼ÖÂÍø ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ