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

PHP Àà µÄʹÓÃ

Óû§¶¨ÒåµÄÀ࣬ҲÊÇѧºÃ PHP Ëù±Ø±¸µÄÌõ¼þÖ®Ò»¡£¶ø PHP µÄÀ࣬ºÍÆäËüµÄÃæÏò¶ÔÏóÓïÑԱȽÏÆðÀ´£¬»¹ËãÂùµ¥´¿µÄ¡£PHP Ö»ÓÐÀà±ð (class)¡¢·½·¨ (method)¡¢ÊôÐÔ¡¢ÒÔ¼°µ¥Ò»¼Ì³Ð (extensions) µÈ¡£¶Ô²»Ï°¹ßʹÓà C++¡¢Java¡¢Delphi µÈÃæÏò¶ÔÏóÓïÑÔÀ´¿ª·¢³ÌÐòµÄÓû§£¬²»·ÁÏÈÔĶÁÒ»ÏÂÓйØÃæÏò¶ÔÏó¸ÅÄîµÄÊ飬ÏàÐÅ¿ÉÒÔ´øÀ´Ðí¶àµÄÊÕ»ñ¡£
ÏÂÃæµÄ·¶ÀýÊÇÊÖÍƳµÀà¡£¿ÉÒÔ¿´µ½£¬Ê¹Óà class ±íʾËüÊÇÒ»¸öÀàÀà±ð¡£ÔÚÀà±ðÖÐµÄ function£¬ÀýÈç add_item Ôò±íʾ¸ÃÀàµÄÒ»¸ö·½·¨¡£·½·¨¿ÉÒÔ·â×°ÀàµÄʵ¼Ê´¦ÀíÇéÐΣ¬ÈøÃÀà×Ô¼ºÄÜÒÀ·â×°ºÃµÄ·½·¨À´Ö´ÐÐһЩ²½Öè¡£
³ÌÐòÖÐµÄ $this Àà±äÁ¿Ò²ºÍ $GLOBALS ¼° $php_errormsg Á½¸ö±äÁ¿Ò»Ñù£¬ÔÚ PHP ÖÐÊôÓÚÌØÊâµÄ±äÁ¿¡£$this ±äÁ¿Ö»ÓÃÔÚÀàÀà±ðÖУ¬±íʾÀàµÄ±¾Éí¡£
<?php
// ³ÌÐòÃû: cart.inc
class Cart {
  var $items;  // ÊÖÍƳµÀà
  
  // ±¾·½·¨¼ÓÈë $num ¼þÎïÆ·µ½ÊÖÍƳµÖР(¼Óµ½ $artnr ±äÁ¿)
  function add_item ($artnr, $num) {
    $this->items[$artnr] += $num;
  }
  
  // ±¾·½·¨´ÓÊÖÍƳµ¼õÉÙ $num ¼þÎïÆ· (´Ó $artnr ±äÁ¿¼õµô)
  function remove_item ($artnr, $num) {
    if ($this->items[$artnr] > $num) {
      $this->items[$artnr] -= $num;
      return true;
    } else {
      return false;
    }   
  }
}
?>
ҪʹÓÃÊÖÍƳµ¿ÉÒÔÓÃÀàËÆÏÂÀýµÄ·½Ê½¡£¿ÉÒÔÏȽ«Ã¿¸öÀà´æ³É Include Îļþ£¬ÔÙ½«Ëü require »ò include ½øÀ´¡£ÔÚ¶¨Òå±äÁ¿ $cart ʱ£¬ÒªÊ¹Óà new µÄ±£Áô×Ö£¬±íʾ $cart ʹÓà Cart ÀࡣʹÓà -> ·ûºÅ£¬±íʾִÐÐÀàµÄ·½·¨¡£
<?php
require("cart.inc");
$cart = new Cart;
$cart->add_item("10", 1);
?>
Ö®ºóÔÙÉè¼ÆÓмÇÃûµÄÊÖÍƳµ¡£¼ÇÃûÊÖÍƳµ´ÓÊÖÍƳµÒÅ´«ÏÂÀ´£¬Òò´ËÊÖÍƳµÓµÓеķ½·¨¼°ÊôÐÔ£¬¼ÇÃûÊÖÍƳ


Ïà¹ØÎĵµ£º

PHP/MYSQLʵÏÖ°´×Öĸ¼ìË÷

·½·¨Ò»£º½¨Ò»¸öÆ´Òô±í t_cosler £¬´æ·Åÿ¸ö×Öĸ¿ªÍ·µÄµÚÒ»¸öºº×ֵıàºÅºÍ×îºóÒ»¸öºº×ֵıàºÅ¡£   
BatchFile code+------+--------+-------+  
| f_PY | cBegin | cEnd  |  
+------+--------+-------+  
| A    |  45217 | 45252 | & ......

ʹÓÃCodeIgniter¿ò¼Ü¿ìËÙ¿ª·¢PHPÓ¦ÓÃ(Ò»)

¶Ô CodeIgniter µÄ½éÉÜ
´ó¶àÊýPHPer¶¼Ïëд³öÔËÐÐ״̬Á¼ºÃµÄÓ¦ÓóÌÐò£¬¶øÇÒÏ£Íû¾¡¿ÉÄÜ×öµÃ¼òµ¥ÇÒ²»·ÑÊ¡£ÕâƪÎÄÕÂÊÇÓÐ¹Ø CodeIgniterµÄ£¨ÒÔºó¼ò³ÆCI£©,CIÊÇÒ»¸ö´ï³ÉÉÏÃæÄ¿µÄµÄËùν¿ò¼Ü¡£
Èç¹ûÄãÖ»ÊÇÒª´ï³ÉÒ»¸ö×îÖյĽá¹û£¬¶ø°ÑÖмäËùÓеıàÂëϸ½ÚºÍ¸´ÔÓͳͳ¶ª¸øÒ»¸ö¿ò¼Ü£¬CIÊÇÄã×îºÃµÄÅóÓÑ¡£
CIÓкܶàÓŵ㣺Ãâ·Ñ, ÇáÁ¿¼¶, ......

ʹÓà CodeIgniter ¿ò¼Ü¿ìËÙ¿ª·¢ PHP Ó¦ÓÃ(¶þ)

¶þ·ÖÖÓ: ½¨Á¢Ò»¸ö CodeIgniter ÍøÕ¾
ÓÃCI½¨Ò»¸öÍøÕ¾ºÜÈÝÒס£ ÕâÒ»Õº̣ܶ¬½âÊÍÁËÓÃCIÖÆ×÷Íøվʱ·¢ÉúÁËЩʲô£¬ÄÄЩÎļþ±»´´½¨£¬ÈÃÎÒÃÇÀ´ÇÆÒ»ÇÆ£º
. ´´½¨ÍøÕ¾ÐèҪʲôÈí¼þ£¿
. °²×° CI Îļþ: Ò»¸ö¼òµ¥µÄÏÂÔغͽâѹËõ²Ù×÷
. CI µÄ»ù±¾ÉèÖÃ: ÓÐÄÄЩÎļþ¼Ð¼°ËüÃÇÊÇÈçºÎ×éÖ¯µÄ
. CI °²×°Ê±Ä¬ÈϵĿØÖÆÆ÷ºÍÊÓͼ
. һЩ¼òµ¥µÄ ......

VisualSVNÔö¼ÓÃÜÂëphpÐÞ¸ÄÒ³Ãæ

VisualSVNÔö¼ÓÃÜÂëphpÐÞ¸ÄÒ³Ãæ
1.¼ÙÉèVisualSVN°²×°ÔÚ C:\Program Files\VisualSVN Server
2.ÏÂÔز¢°²×°php windows°æ±¾£¬¼ÙÉè°²×°ÔÚc:\php
  ¿ÉÒÔµ½php¹Ù·½ÍøÕ¾ÏÂÔØ www.php.net
  ¸½¼þÖдøµÄÊÇ php-5.3.2-Win32-VC6-x86.zip
3.VisualSVNÔö¼ÓphpÖ§³Ö
×¢ÒâÐÞ¸Ä "c:/php/php5apache2_2.dll" ΪÕýȷ·¾¶
C:\ ......

PHP string

<?php
$s = "new string";
//ÏÂÃæË«ÒýºÅ×Ö·û´®ÖеķûºÅ"$"δ×öתÒ壬Òò´Ë$s½«±»Ìæ»»³ÉÆä±äÁ¿µÄÖµ
$str_1 = "Ë«ÒýºÅÖ¸¶¨µÄ×Ö·û´®£¬$s";
//ÏÂÃæË«ÒýºÅ×Ö·û´®ÖеķûºÅ"$"×öÁËתÒ壬Òò´Ë$sÔ­·â²»¶¯£¬²»»á±»Ì滻Ϊ±äÁ¿$sµÄÖµ
$str_2 = "Ë«ÒýºÅÖ¸¶¨µÄ×Ö·û´®£¬\$s";
//µ¥ÒýºÅ×Ö·û´®ÖеÄ"$"²»ÓÃ×öתÒå¼´¿ÉÔ­ÑùÊä³ö
$str_3 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ