ÎåÖÖ³£¼ûµÄ PHP Éè¼Æģʽ
Éè¼Æģʽ Ò»Ê齫Éè¼ÆģʽÒýÈëÈí¼þÉçÇø£¬¸ÃÊéµÄ×÷ÕßÊÇ Erich Gamma¡¢Richard Helm¡¢Ralph Johnson ºÍ John Vlissides Design£¨Ë×³Æ “ËÄÈ˰©¡£Ëù½éÉܵÄÉè¼Æģʽ±³ºóµÄºËÐĸÅÄî·Ç³£¼òµ¥¡£¾¹ý¶àÄêµÄÈí¼þ¿ª·¢Êµ¼ù£¬Gamma µÈÈË·¢ÏÖÁËijЩ¾ßÓй̶¨Éè¼ÆµÄģʽ£¬¾ÍÏñ½¨ÖþʦÉè¼Æ·¿×Ӻͽ¨ÖþÎïÒ»Ñù£¬¿ÉÒÔΪԡÊÒµÄλÖûò³ø·¿µÄ¹¹Ô췽ʽ¿ª·¢Ä£°å¡£Ê¹ÓÃÕâЩģ°å»òÕß˵Éè¼Æģʽ Òâζ×Å¿ÉÒÔ¸ü¿ìµØÉè¼Æ¸üºÃµÄ½¨ÖþÎͬÑùµÄ¸ÅÄîÒ²ÊÊÓÃÓÚÈí¼þ¡£
Éè¼Æģʽ²»½ö´ú±íןü¿ì¿ª·¢½¡×³Èí¼þµÄÓÐÓ÷½·¨£¬¶øÇÒ»¹ÌṩÁËÒÔÓѺõÄÊõÓï·â×°´óÐÍÀíÄîµÄ·½·¨¡£ÀýÈ磬Äú¿ÉÒÔ˵ÄúÕýÔÚ±àдһ¸öÌṩËÉÉ¢ñîºÏµÄÏûÏ¢´«µÝϵͳ£¬Ò²¿ÉÒÔ˵ÄãÕýÔÚ±àдÃû³ÆΪ¹Û²ìÕß µÄģʽ¡£
ÓýÏСµÄʾÀýչʾģʽµÄ¼ÛÖµÊǷdz£À§Äѵġ£ÕâÍùÍùÓÐЩ´ó²ÄСÓõÄÒâ棬ÒòΪģʽʵ¼ÊÉÏÊÇÔÚ´óÐÍ´úÂë¿âÖз¢»Ó×÷Óõġ£±¾ÎIJ»Õ¹Ê¾´óÐÍÓ¦ÓóÌÐò£¬ËùÒÔÄúÐèҪ˼Ë÷µÄÊÇÔÚÄú×Ô¼ºµÄ´óÐÍÓ¦ÓóÌÐòÖÐÓ¦ÓÃʾÀýÔÀíµÄ·½·¨ —— ¶ø²»ÊDZ¾ÎÄÑÝʾµÄ´úÂë±¾Éí¡£Õâ²»ÊÇ˵Äú²»Ó¦¸ÃÔÚСӦÓóÌÐòÖÐʹÓÃģʽ¡£ºÜ¶àÁ¼ºÃµÄÓ¦ÓóÌÐò¶¼ÒÔСӦÓóÌÐòΪÆðµã£¬Öð½¥·¢Õ¹µ½´óÐÍÓ¦ÓóÌÐò£¬ËùÒÔûÓÐÀíÓɲ»ÒÔ´ËÀàÔúʵµÄ±àÂëʵ¼ùΪ»ù´¡¡£
¼ÈÈ»ÄúÒѾÁ˽âÁËÉè¼ÆģʽÒÔ¼°ËüÃǵÄÓÐÓÃÖ®´¦£¬ÏÖÔÚÎÒÃÇÀ´¿´¿´ PHP V5 µÄÎåÖÖ³£ÓÃģʽ¡£
¹¤³§Ä£Ê½
×î³õÔÚÉè¼Æģʽ Ò»ÊéÖУ¬Ðí¶àÉè¼Æģʽ¶¼¹ÄÀøʹÓÃËÉÉ¢ñîºÏ¡£ÒªÀí½âÕâ¸ö¸ÅÄÈÃÎÒÃÇ×îºÃ̸һÏÂÐí¶à¿ª·¢ÈËÔ±´ÓÊ´óÐÍϵͳµÄ¼è¿àÀú³Ì¡£ÔÚ¸ü¸ÄÒ»¸ö´úÂëƬ¶Îʱ£¬¾Í»á·¢ÉúÎÊÌ⣬ϵͳÆäËû²¿·Ö —— ÄúÔøÈÏΪÍêÈ«²»Ïà¹ØµÄ²¿·ÖÖÐÒ²ÓпÉÄܳöÏÖ¼¶ÁªÆÆ»µ¡£
¸ÃÎÊÌâÔÚÓÚ½ôÃÜñîºÏ ¡£ÏµÍ³Ä³¸ö²¿·ÖÖеĺ¯ÊýºÍÀàÑÏÖØÒÀÀµÓÚϵͳµÄÆäËû²¿·ÖÖк¯ÊýºÍÀàµÄÐÐΪºÍ½á¹¹¡£ÄúÐèÒªÒ»×éģʽ£¬Ê¹ÕâЩÀàÄܹ»Ï໥ͨÐÅ£¬µ«²»Ï£Íû½«ËüÃǽôÃÜ°ó¶¨ÔÚÒ»Æð£¬ÒÔ±ÜÃâ³öÏÖÁªËø¡£
ÔÚ´óÐÍϵͳÖУ¬Ðí¶à´úÂëÒÀÀµÓÚÉÙÊý¼¸¸ö¹Ø¼üÀà¡£ÐèÒª¸ü¸ÄÕâЩÀàʱ£¬¿ÉÄÜ»á³öÏÖÀ§ÄÑ¡£ÀýÈ磬¼ÙÉèÄúÓÐÒ»¸ö´ÓÎļþ¶ÁÈ¡µÄ User Àà¡£ÄúÏ£Íû½«Æä¸ü¸ÄΪ´ÓÊý¾Ý¿â¶ÁÈ¡µÄÆäËûÀ࣬µ«ÊÇ£¬ËùÓеĴúÂ붼ÒýÓôÓÎļþ¶ÁÈ¡µÄÔʼÀà¡£Õâʱºò£¬Ê¹Óù¤³§Ä£Ê½»áºÜ·½±ã¡£
¹¤³§Ä£Ê½ ÊÇÒ»ÖÖÀ࣬Ëü¾ßÓÐΪÄú´´½¨¶ÔÏóµÄijЩ·½·¨¡£Äú¿ÉÒÔʹÓù¤³§Àà´´½¨¶ÔÏ󣬶ø²»Ö±½ÓʹÓà new¡£ÕâÑù£¬Èç¹ûÄúÏëÒª¸ü¸ÄËù´´½¨µÄ¶ÔÏóÀàÐÍ£¬Ö»Ðè¸ü¸Ä¸Ã¹¤³§¼´¿É¡£Ê¹Óøù¤³§µÄËùÓдúÂë»á×Ô¶¯¸ü¸Ä¡£
Çåµ¥ 1 ÏÔʾ¹¤³§ÀàµÄÒ»¸öʾÁС£µÈʽµÄ·þÎñÆ÷¶Ë°üÀ¨Á½¸ö²¿·Ö£ºÊý¾Ý¿âºÍÒ»×é PHP Ò³Ã棬ÕâЩҳÃæÔÊÐíÄúÌ
Ïà¹ØÎĵµ£º
ÔËËã·ûÓÃÓÚ¶ÔÖµ½øÐÐÔËËã.
PHP ÔËËã·û
±¾²¿·ÖÁгöÁËÔÚ PHP ÖÐʹÓõĸ÷ÖÖÔËËã·û£º
ËãÊýÔËËã·û
ÔËËã·û˵Ã÷Àý×Ó½á¹û
+
Addition
x=2
x+2
4
-
Subtraction
x=2
5-x
3
*
Multiplication
x=4
x*5
20
/
Division
15/5
5/2
3
2.5
%
Modulus (division remainder)
5%2
10%8
10%2
1
2
0
++
Incre ......
phpµÄÅäÖú¯Êý¾ÍÊǼ¸¸öini_*µÄº¯Êý£¬Ö÷ÒªÊÇÕë¶ÔÅäÖÃÎļþµÄ²Ù×÷£¬Æäʵ¾ÍËĸöº¯Êý£ºini_get¡¢ini_set¡¢ini_get_all¡¢ini_restore¡£¸öÈ˸оõ×îÓÐÓõľÍÊÇini_setºÍini_get¡£
* ini_get()£º»ñÈ¡ÅäÖÃÎļþµÄÑ¡ÏîÖµ
Õâ¸öº¯ÊýÏàÐźܶàÈ˶¼Ê¹¹ý£¬¾ÍÊÇ»ñÈ¡ÅäÖÃÎļþÖÐijһ¸öÑ¡ÏîµÄÖµ£¬Èç¹ûÊÇÈ«Ó°È˲ÅÍøtrueÖµ¾Í·µ»Ø1£¬Èç¹ûÊÇfalseÖµ¾ ......
ÔÚwindowsϵÄphp.iniÎļþÀï
ÕÒµ½ÕâÒ»ÐдúÂ루ÈçûÓÐÔò×ÔÐÐÌí¼Ó£©
extension=php_soap.dll
SOAPÔÚphp.iniÖл¹ÓÐ×Ô¼ºµÄÅäÖò¿·Ö£¬ÈçÏÂËùʾ
[soap]
; Enables or disables WSDL caching feature.
soap.wsdl_cache_enabled=1
; Sets the directory name where SOAP extension will put cache files.
soap.wsdl_cache_d ......
ÈëÃÅ֪ʶ
Ôڴ˼ٶ¨Äú¶Ô PHP µÄÓï·¨ÓÐÒ»¸ö´óÖµÄÁ˽⣬ÖÁÉÙÄܹ»±àд“Hello World”Ö®ÀàµÄ³ÌÐò¡£Èç¹ûÄú²»¾ß±¸»ù´¡ÖªÊ¶£¬ÔòÇëÊ×ÏÈѧϰ PHP ÊÖ²áºÍijЩ»ù±¾µÄ PHP ½Ì³Ì¡£ºÜ¶à³ö°æÉ̶¼ÓйØÓÚ PHP µÄºÃÊé¡£½¨Òé³õѧÕßÒ»¿ªÊ¼ÏÈ¿´¿´ÈëÃÅÊé¼®»òʳÆ×ÐÎʽµÄÊé¼®¡£
ÔÚÉú²ú»·¾³µÄ׼ȷ¸±±¾ÉÏÖ´ÐÐÉó¼Æ¡£Äú²»ÐèÒª¸´ÖÆÓ²¼þ£¬µ«Ê ......
[ת×Ô]http://hi.baidu.com/heiday/blog/item/ce3217006b10c0df277fb5b1.html
phpº¯Êý getenv()Óëputenv()ºÍ$_SERVER
2009-07-09 15:03
getenv È¡µÃϵͳµÄ»·¾³±äÁ¿
Óï·¨£ºstring getenv(string varname);-----------²ÎÊývarnameÓ¦¸ÃÊÇ$_SERVER£¨·þÎñÆ÷³¬¼¶È«¾Ö±äÁ¿Êý×飩ÖÐÔ¤¶¨µÄÔªËØË÷ÒýÃû¡¢»òÕßÊÇÓÃputenv("new=very ......