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

phpÖÐµÄ Àà³£Á¿ Class Constants


It is possible to define constant values on a per-class basis remaining the same and unchangeable.
Constants differ from normal variables in that you don't use the $ symbol to declare or use them. Like static members, constant values cannot be accessed from an instance of the object (using $object::constant).
˵Ã÷£º  const ³£Á¿ ²»Óà $ ·ûºÅ
const ²»¼Ó¹Ø¼ü×Ö private ÐÞÊΠ //Like static members, 
²»ÄÜͨ¹ý ¶ÔÏó·ÃÎÊ¡£ Ö»ÄÜͨ¹ýclass·ÃÎÊ
Àý×Ó 19-15. Defining and using a constant
<?php
class MyClass
{
    const constant = 'constant value';
    function showConstant() {
        echo  self::constant . "\n";
    }
}
echo MyClass::constant . "\n";
$class = new MyClass();
$class->showConstant();
// echo $class::constant;  is not allowed
?>


Ïà¹ØÎĵµ£º

PHP±éÀú¶àάÊý×麯Êý

function handleEach(&$array,$functionName)
{
foreach($array as $k=>$v)
{
if(is_array($v))
{
handleEach(&$array[$k],$functionName);
}
else
$array[$k] = $functionName($v);
return $array[$k];
}
} ......

php»·¾³´î½¨£¨×Ô¼ºÒ²Ð´Ò»Æª£©

Ê×ÏÈ×¢Òâ°æ±¾ÎÊÌ⣬һ¶¨Òª×Ðϸ²é¿´php manualÉϵÄÄÚÈÝ£¬Èçhttp://www.php.net/manual/en/install.windows.apache2.php ÉÏÓÐÒ»¸önote:
Note
:
Apache 2.2 Support

Users of Apache 2.2 should note that the DLL file for Apache 2.2 is
named php5apache2_2.dll
rather than php5apache2.d ......

phpºÍapache°æ±¾Æ¥ÅäÎÊÌâ(¸ãÁËÒ»ÕûÌì,×°ÁËÒ»´Îϵͳ)

1:·ÅÁË6¸öÎļþÔÚcÅÌÏÂ(php5ts.dll,libmysql.dll ,php_gd2.dll,php_mysql.dll,php_mbstring.dll ),Ò»¸öÔÚwindowsÏÂ,ÁíÎå¸öÔÚwindows/system32ÏÂ
2:ÅäÖÃÁËpath
3:ÃüÁî:httpd.exe -w -n "Apache2" -k start À´²é¿´ÊÇÄÄÒ»ÐеĴíÎóÐÅÏ¢.
×ܽá:µ½ÏÖÔÚΪֹ,ÕûÁËÒ»Ìì,×°ÁËÈý´ÎϵͳµÄÂé·³ÖÕÓÚÇ×ÉíÖ¤Ã÷ÁË,
Õâ¸ö×ï¿ý»öÊײúÉúµÄÔ­Òò ......

ÎÒµÄ2009Ä깤×÷¾­ÑéС½á(php³ÌÐòÔ±)

תÑÛÓÖÊÇÒ»Äê¹ýÈ¥ÁË£¬Ëƺõ£¬×î½üÎåÁùÄêÀ´£¬Ò»Ö±¶¼¹ýµÃ²»ÄÇô˳Àû£¬½ñÄ껹ËãÊDz»´í£¬ÖÁÉÙ£¬ÔÚ¿Í»§¡¢ÀÏ°åºÍͬʵİïÖúÏ£¬Ò»ÄêµÄ¹¤×÷£¬ÖÕÓÚÔÚÄêÇ°ÊÕβÁË¡£ÔÚ´ËС½áһϣ¬ÎüȡһЩ½Ìѵ£¬ÒÔÃâÀ´ÄêÖØ·¸ÏàͬµÄ´íÎó¡£
1¡¢×öÁËÒ»¸ö×îÕýÈ·µÄÑ¡Ôñ£º¹Ò¿¿Ò»¼ÒÈí¼þ¹«Ë¾×ö³ÌÐò¡£×ö³ÌÐòºÍ×öÒµÎñ£¬ÊDz»Ó¦¸Ãͬһ¸öÈ˽øÐеģ¬¾ÍËã¿Í»§ÊÇÖ÷¶¯É ......

PHPÍøÕ¾¿ª·¢·½°¸

http://www.phpli.com/tuto/viewarticle.php?columns=tutorial&id=493
Ò»¡¢¿ª·¢³ÉÔ±
a)ÏîÄ¿Ö÷¹Ü
b)Ò³ÃæÃÀ¹¤
c)Ò³Ã濪·¢
d)·þÎñ¶Ë³ÌÐò¿ª·¢
e)ϵͳÓëÊý¾Ý¹ÜÀí
f)²âÊÔÓë°æ±¾¿ØÖÆ
¶þ¡¢ ÍøÕ¾×鿪·¢¼òÃ÷Á÷³Ì
Èý¡¢ ¿ª·¢¹¤¾ßÓë»·¾³
a)·þÎñÆ÷ÅäÖÃ
i. WEB·þÎñÆ÷£º FreeBSD6.1+Apache2.0+PHP5.0£¬SVN°æ±¾¿ØÖÆ·þÎñ(½ö²âÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ