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

ÎåÖÖ³£¼ûµÄ PHP Éè¼Æģʽ


¼¶±ð£º Öм¶
Jack D Herrington
(jherr@pobox.com
), ¸ß¼¶Èí¼þ¹¤³Ìʦ, Leverage Software Inc.
2006 Äê 10 ÔÂ 19 ÈÕ
Éè¼ÆģʽֻÊÇΪ Java™ ¼Ü¹¹Ê¦×¼±¸µÄ —— ÖÁÉÙÄú¿ÉÄÜÒ»Ö±ÕâÑùÈÏΪ¡£Êµ¼ÊÉÏ£¬Éè¼Æģʽ¶ÔÓÚÿ¸öÈ˶¼·Ç³£ÓÐÓá£Èç¹ûÕâЩ¹¤¾ß²»ÊÇ “¼Ü¹¹Ì«¿ÕÈË” µÄרÀû£¬ÄÇôËüÃÇÓÖÊÇʲô£¿ÎªÊ²Ã´ËµËüÃÇÔÚ PHP Ó¦ÓóÌÐòÖзdz£ÓÐÓ㿱¾ÎĽâÊÍÁËÕâЩÎÊÌâ¡£
Éè¼Æģʽ
Ò»Ê齫Éè¼ÆģʽÒýÈëÈí¼þÉçÇø£¬¸ÃÊéµÄ×÷ÕßÊÇ Erich Gamma¡¢Richard Helm¡¢Ralph Johnson ºÍ John Vlissides Design£¨Ë×³Æ “ËÄÈ˰©¡£Ëù½éÉܵÄÉè¼Æģʽ±³ºóµÄºËÐĸÅÄî·Ç³£¼òµ¥¡£¾­¹ý¶àÄêµÄÈí¼þ¿ª·¢Êµ¼ù£¬Gamma µÈÈË·¢ÏÖÁËijЩ¾ßÓй̶¨Éè¼ÆµÄģʽ£¬¾ÍÏñ½¨ÖþʦÉè¼Æ·¿×Ӻͽ¨ÖþÎïÒ»Ñù£¬¿ÉÒÔΪԡÊÒµÄλÖûò³ø·¿µÄ¹¹Ô췽ʽ¿ª·¢Ä£°å¡£Ê¹ÓÃÕâЩģ°å»òÕß˵Éè¼Æģʽ
Òâζ×Å¿ÉÒÔ¸ü¿ìµØÉè¼Æ¸üºÃµÄ½¨ÖþÎͬÑùµÄ¸ÅÄîÒ²ÊÊÓÃÓÚÈí¼þ¡£
Éè¼Æģʽ²»½ö´ú±íןü¿ì¿ª·¢½¡×³Èí¼þµÄÓÐÓ÷½·¨£¬¶øÇÒ»¹ÌṩÁËÒÔÓѺõÄÊõÓï·â×°´óÐÍÀíÄîµÄ·½·¨¡£ÀýÈ磬Äú¿ÉÒÔ˵ÄúÕýÔÚ±àдһ¸öÌṩËÉÉ¢ñîºÏµÄÏûÏ¢´«µÝϵͳ£¬Ò²¿ÉÒÔ˵ÄãÕýÔÚ±àдÃû³ÆΪ¹Û²ìÕß
µÄģʽ¡£
ÓýÏСµÄʾÀýչʾģʽµÄ¼ÛÖµÊǷdz£À§Äѵġ£ÕâÍùÍùÓÐЩ´ó²ÄСÓõÄÒâ棬ÒòΪģʽʵ¼ÊÉÏÊÇÔÚ´óÐÍ´úÂë¿âÖз¢»Ó×÷Óõġ£±¾ÎIJ»Õ¹Ê¾´óÐÍÓ¦ÓóÌÐò£¬ËùÒÔÄúÐèҪ˼Ë÷µÄÊÇÔÚÄú×Ô¼ºµÄ´óÐÍÓ¦ÓóÌÐòÖÐÓ¦ÓÃʾÀýÔ­ÀíµÄ·½·¨ —— ¶ø²»ÊDZ¾ÎÄÑÝʾµÄ´úÂë±¾Éí¡£Õâ²»ÊÇ˵Äú²»Ó¦¸ÃÔÚСӦÓóÌÐòÖÐʹÓÃģʽ¡£ºÜ¶àÁ¼ºÃµÄÓ¦ÓóÌÐò¶¼ÒÔСӦÓóÌÐòΪÆðµã£¬Öð½¥·¢Õ¹µ½´óÐÍÓ¦ÓóÌÐò£¬ËùÒÔûÓÐÀíÓɲ»ÒÔ´ËÀàÔúʵµÄ±àÂëʵ¼ùΪ»ù´¡¡£
¼ÈÈ»ÄúÒѾ­Á˽âÁËÉè¼ÆģʽÒÔ¼°ËüÃǵÄÓÐÓÃÖ®´¦£¬ÏÖÔÚÎÒÃÇÀ´¿´¿´ PHP V5 µÄÎåÖÖ³£ÓÃģʽ¡£
¹¤³§Ä£Ê½
×î³õÔÚÉè¼Æģʽ
Ò»ÊéÖУ¬Ðí¶àÉè¼Æģʽ¶¼¹ÄÀøʹÓÃËÉÉ¢ñîºÏ
¡£ÒªÀí½âÕâ¸ö¸ÅÄÈÃÎÒÃÇ×îºÃ̸һÏÂÐí¶à¿ª·¢ÈËÔ±´ÓÊ´óÐÍϵͳµÄ¼è¿àÀú³Ì¡£ÔÚ¸ü¸ÄÒ»¸ö´úÂëƬ¶Îʱ£¬¾Í»á·¢ÉúÎÊÌ⣬ϵͳÆäËû²¿·Ö —— ÄúÔøÈÏΪÍêÈ«²»Ïà¹ØµÄ²¿·ÖÖÐÒ²ÓпÉÄܳöÏÖ¼¶ÁªÆÆ»µ¡£
¸ÃÎÊÌâÔÚÓÚ½ôÃÜñîºÏ
¡£ÏµÍ³Ä³¸ö²¿·ÖÖеĺ¯ÊýºÍÀàÑÏÖØÒÀÀµÓÚϵͳµÄÆäËû²¿·ÖÖк¯ÊýºÍÀàµÄÐÐΪºÍ½á¹¹¡£ÄúÐèÒªÒ»×éģʽ£¬Ê¹ÕâЩÀàÄܹ»Ï໥ͨÐÅ£¬µ«²»Ï£Íû½«ËüÃǽôÃÜ°ó¶¨ÔÚÒ»Æð£¬ÒÔ±ÜÃâ³öÏÖÁªËø¡£
ÔÚ´óÐÍϵͳÖУ¬Ðí¶à´úÂëÒÀÀµÓÚÉÙÊý¼¸¸ö¹Ø¼üÀà¡£ÐèÒª¸ü¸ÄÕâЩÀàʱ£¬¿ÉÄÜ»á³öÏÖÀ§ÄÑ¡£ÀýÈ磬¼ÙÉèÄúÓÐÒ»¸ö´ÓÎļþ¶ÁÈ¡µÄ User
Àà¡£ÄúÏ£Íû½«Æä¸ü¸


Ïà¹ØÎĵµ£º

PHP¹¹Ô캯Êý


¡¡¡¡¹¹Ô캯ÊýÊÇPHPÖÐ×ÜÒªµÄ»ù±¾Óï·¨£¬Ê²Ã´Êǹ¹Ô캯ÊýÄØ?ÎÒÃÇÕâÀï¾ÍÒ»ÆðÀ´¿´¿´PHP¹¹Ô캯Êý¡£Èç¹ûÄãÔÚÒ»¸öÀàÖÐÉùÃ÷Ò»¸öº¯Êý,ÃüÃûΪ__construct,Õâ¸öº¯Êý½«±»µ±³ÉÊÇÒ»¸ö¹¹Ô캯Êý²¢ÔÚ½¨Á¢Ò»¸ö¶ÔÏóʵÀýʱ±»Ö´ÐÐ.Çå³þµØ˵,__ÊÇÁ½¸öÏ»®Ïß.¾ÍÏñÆäËüÈκκ¯ÊýÒ»Ñù,¹¹Ô캯Êý¿ÉÄÜÓвÎÊý»òÕßĬÈÏÖµ.Äã¿ÉÒÔ¶¨ÒåÒ»¸öÀàÀ´½¨Á¢Ò»¸ö¶ÔÏó²¢½ ......

ÔÚphpͼƬÖÐÊäÈëÖÐÎÄÎÄ×Ö½â¾öÂÒÂë

´úÂ룺
<?php
$im = imagecreatefromjpeg("ok.jpg");
$black = @imagecolorallocate($im, 0,0,0);
$jpgnumid = "ÕâÊÇǶÈ뵽ͼƬµÄÎÄ×Ö£¬½â¾öÁËÂÒÂëÎÊÌâ,
ÉÏÃæµÄok.jpgÊÇͬĿ¼ÏµÄÕÕƬ.ʹÓÃËüʱ£¬»¹ÐèÒªÓÐiconv
Ä£¿é£¡Ò²¾ÍÊÇ˵ÔÚphp.iniÀォ
[iconv]
iconv.input_encoding = ISO-8859-1
iconv.internal_encodin ......

PHP ³õʶ

ÒÔS2µÄBBSÂÛ̳ÏîÄ¿×÷ΪÕû¸ö»ù´¡¿Î³ÌµÄ°¸Àý¡£
1.Á¬½ÓÊý¾Ý¿âºÍÖ´ÐеÚÒ»¸öSQLÓï¾ä:
  1)PHPÌṩÁËÁ¬½ÓÊý¾Ý¿âµÄº¯Êý--mysqli_connect(agrs0,agrs1,agrs3)£¬ÎÒÃÇÖ±½ÓʹÓþͿÉÒÔÁË¡£
    ´Ëº¯Êý°üÀ¨Èý¸ö±ØÒªµÄ²ÎÊý£¬·Ö±ðΪ£ºlocalhost£¬Êý¾Ý¿âÓû§Ãû£¬Êý¾ÝÔ´¡£
     ÒÔbbsÂÛ̳Á¬½ÓMy ......

php ´úÌæ echo ·½·¨, »òÕßphpµÄ Ìæ»»Ó﷨ʹÓ÷½·¨.

ÐÞ¸Äphp.iniÎļþ.
ÈçÏÂ.
1. short_open_tag = Off
Èç¹û¸Ä³ÉOn
ÎÒÃÇ¿ÉÒÔÔÚphpÖÐ
<?= $variable?>À´´úÌæ <?php echo $variable ?>
2. asp_tags = Off
Èç¹û¸Ä³ÉOn
ͬÑù¿ÉÒÔÔÚphpÖÐ
<%= $variable %> À´Ìæ´ú<?php echo $variable ?>
ÔõôÑù. ·½±ã°É????
¼ÌÐøÑо¿~~~~~~!!!!~~!~!~!~!~!~!~! ......

PHPÎÄÕÂÈçºÎºÍÊý¾Ý¿âÁ¬½Ó£¨1£©

£¨1£©
Warning: mysql_query() [function.mysql-query]: Access denied for user
'ODBC'@'localhost' (using password: NO) in C:\Program Files\Apache
Software Foundation\Apache2.2\htdocs\TM\conn\conn.php on line 32
Warning: mysql_query() [function.mysql-query]: A link to the server could
not be est ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ