PHPÖÐÕýÔò±í´ïʽµÄʹÓ÷½·¨[±Ê¼Ç]
ÔÚѧϰphpʱ£¬¿´µ½µÄ£¬×ö¸ö±Ê¼Ç
×Ö·û´®Í·²¿£º^
<?php echo ereg(“^hello”,”hello world!”); ?>
×Ö·û´®Î²²¿£º$
<?php echo ereg(“bye$”,”goodbye”); ?>
ÈÎÒâµÄµ¥¸ö×Ö·û£º.
<?php echo ereg(“.”,”goodbye”); ?>
ÏÞÖÆÆ¥Åä×Ö·ûÊýÁ¿£º{}
<?php echo ereg(“.{5}$”,”12345”); ?> //ÖÁÉÙÔÚβ²¿³öÏÖ5¸öÈÎÒâ×Ö·û
<?php echo ereg(“a{1,3}$”,”aaa”); ?> //ÖÁÉÙÔÚβ²¿³öÏÖ1-3¸ö×Ö·ûa
Áã´Î»ò¶à´ÎÖظ´×Ö·û£º*
<?php echo ereg(“t*”,”tom”); ?> //t¿ÉÒÔ³öÏÖÁã´Î»òÖظ´£¬ÈκÎ×Ö·û¶¼·µ»Ø true
Ò»´Î»ò¶à´ÎÖظ´×Ö·û£º+
<?php echo ereg(“t+”,”tom”); ?> //tÖÁÉÙÒª³öÏÖÒ»´Î
Áã´Î»òÒ»´ÎÖظ´×Ö·û£º?
<?php echo ereg(“t?”,”tom”); ?> //tÖ»ÄܳöÏÖÒ»´Î
¿Õ¸ñ×Ö·û£º[[:space:]]
<?php echo ereg("hello[[:space:]]?world","hello world"); ?>
ģʽ·Ö×é []
<?php echo ereg("^[a-z]+$","hello"); ?> //aµ½zµÄËùÓÐСд×Ö·û
<?php echo ereg("^[a-zA-Z]+$","hello"); ?> //aµ½zµÄËùÓдóСд×Ö·û
´ÊÓï·Ö×é |
<?php echo ereg("^(ÕÅ|Àî).+$","ÕÅÈý"); ?> //ÕÅ»òÀͷ£¬ºóÃæÖÁÉÙÒ»¸ö×Ö·û
ÌØÊâ×Ö·û(×Ö·ûתÒå) \ &
Ïà¹ØÎĵµ£º
eclipse ¿ìËÙ½¨Á¢PHPµ÷ÊÔ»·¾³
ÔÚÍøÉÏ¿´ÁËÐí¶à¹ØÓÚeclipse ½¨Á¢PHPµ÷ÊÔ»·¾³µÄÎÄÕÂ,×Ô¼ºÈ¥³¢ÊÔÁËÒ»·,µ«¶¼Ã»Óгɹ¦,ºóÀ´×Ô¼ºµ½ZendµÄ¹Ù·½È¥¿´,ÔÀ´ÊÇ°æ±¾µÄÎÊÌâ.ÏÖÔÚÌṩÍêÕûµÄÅäÖò½Öè.Ï£Íû³õѧÕßÄÜ¿ìËÙ½¨Á¢ºÃ»·¾³,°Ñ¾«Á¦¼¯Öе½´úÂë¶ø²»ÊÇÅäÖÃÉÏ.Èç¹ûÄú¿´Í껹ûÓÐÅäÖóɹ¦,Äú»¹¿ÉÒÔµã»÷ ÊÓƵ1 ÊÓƵ2 ´Ë´ ......
PHP¸ÅÊö£º
phpÊÇHypertext Preprocessor(³¬Îı¾Ô¤´¦ÀíÆ÷)µÄËõд£¬ÊÇÒ»ÖÖ·þÎñÆ÷¶Ë¡¢¿çƽ̨¡¢HTMLǶÈëʽµÄ½Å±¾ÓïÑÔ£¬Æä¶ÀÌصÄÓï·¨»ìºÏÁËCÓïÑÔ¡¢JavaÓïÑÔºÍPerlÓïÑÔµÄÌص㣬ÊÇÒ»ÖÖ±»¹ã·ºÓ¦ÓõĿªÔ´Ê½µÄ¶àÓÃ;½Å±¾ÓïÑÔ£¬
ÓÈÆäÊʺÏweb¿ª·¢¡£phpÊÇb/sÌåϵ½á¹¹£¬ÊôÓÚÈý²ã½á¹¹¡£·þÎñÆô¶¯ºó£¬Óû§²»ÓÃÏàÓ¦¿Í»§¶ËÈí¼þ£¬Ö»ÓÃä¯ÀÀÆ÷ä¯ ......
pack/unpackµÄÃþ°å×Ö·û×Ö·ûº¬Òå
format ²ÎÊýµÄ¿ÉÄÜÖµ£º
a - NUL-padded string
A - SPACE-padded string
h - Hex string, low nibble first
H - Hex string, high nibble first
c - signed char
C - unsigned char
s - signed short (always 16 bit, machine byte order)
S - unsigned short (always 16 bi ......
{Ò»}PHPÖÐthis,self,parentµÄÇø±ðÖ®Ò»thisƪ
ÃæÏò¶ÔÏó±à³Ì(OOP,Object Oriented Programming)ÏÖÒѾ³ÉΪ±à³ÌÈËÔ±µÄÒ»Ïî»ù±¾¼¼ÄÜ¡£ÀûÓÃOOPµÄ˼Ïë½øÐÐPHPµÄ¸ß¼¶±à³Ì£¬¶ÔÓÚÌá¸ßPHP±à³ÌÄÜÁ¦ºÍ¹æ»®web¿ª·¢¹¹¼Ü¶¼ÊǺÜÓÐÒâÒåµÄ¡£
PHP5¾¹ýÖØдºó£¬¶ÔOOPµÄÖ§³Ö¶îÓÐÁ˺ܴóµÄ·ÉÔ¾£¬³ÉΪÁ˾߱¸ ......