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

PHPÄ£°åÒýÇæSmartyÏê½â(»ù±¾¸Å¿ö)

PHPChina×ÊѶ£ºSmartyÊÇÓÉMonte OhrtºÍAndrei Zmievskiд³öµÄPHPÄ£°åÒýÇæ¡£Ëü²»Í¬ÓÚÆäËûµÄÄ£°åÒýÇ棬±ÈÈçFastTemplate»òÕßpatTemplate£¬ÆäÖÐÖ÷ÒªÔ­Òò¾ÍÊÇSmarty»á½«Ä£°åת»¯³ÉPHP½Å±¾£¬²¢ÌÞ³ýÿ´ÎʹÓøÃÄ£°åʱ¶¼»á³öÏÖÔÚ½âÎö»·½ÚÀïµÄÓÃÀ´¿ØÖƺʹíÎó¼ìÑéµÄ¸½¼ÓÂë¡£Õâ¸ö¹¦ÄÜʹSmartyÔÚ´óÐÍÓ¦Óú͸ßÁ÷Á¿ÍøÕ¾ÉÏÓÐÓÅÒìµÄ±íÏÖ¡£
Smarty³ýÁËÄ£°å±àÒ뻹ÓкܶàÆäËûµÄÍ»³öÌØÐÔ£¬ÎÒÃÇ»áÔÚºóÃæÏêϸµÄÌÖÂÛ¡£Ê×ÏÈ£¬ÎÒÃÇÀ´½ÒÃØÄ£°å±àÒë¡£“Ä£°åµÄ±àÒë”ÊÇʲôÒâ˼£¿ÍøÒ³ÐèÒª×öʲôÑùµÄ±àÒ룿±àÒë²»ÊÇC++ºÍJavaÒ²Òª×öÂð£¿Êǵģ¬µ«ÊÇÕâÀïµÄ±àÒë»áÉÔÓв»Í¬¡£
Smarty½«ÄãµÄÄ£°å½âÎö£¬È»ºóת»»³ÉPHP½Å±¾£¬¶ø²»ÊǶþ½øÖÆÂ룬ÏñÔÚÒ»°ãµÄ±à³ÌÖÐ×öµÄÄÇÑù¡£ÕâÑù£¬µ±ÄãµÄÍøÒ³±»ä¯ÀÀʱ£¬SmartyÖ±½Ó¶ÁÈ¡PHP½Å±¾Îļþ£¬¶ø²»ÊÇÄ£°å±¾Éí£¬ÕâÑù¾Í½ÚÊ¡ÁËÔٴνâÎöµÄʱ¼ä¡£SmartyÔÚ¾ö¶¨ºÎʱ±àÒëÉÏÒ²ºÜÖÇÄÜ£¬ËûÖ»ÔÚÄã¶ÔÍøÒ³ÓÐʵ¼ÊµÄ¸ü¸ÄµÄʱºò²Å»áÖØбàÒ룬ËùÒÔÄã²»ÐèÒªµ£ÐÄÊÖ¶¯±àÒë»á³öÏÖÎÊÌâ¡£ÕâÑù×öµÄºÃ´¦¾ÍÊÇÄã²»ÐèÒªÁ˽âÈκιØÓÚPHP½Å±¾ºÍ±àÂëµÄ֪ʶ¡£ÕâЩ¶¼ÊÇÔÚºóÌì²Ù×÷µÄ£¬ËùÒÔÈç¹ûÄãµÄÄ£°åÉè¼ÆʦÉõÖÁ¶¼²»ÐèÒªÖªµÀSmartyÊÇÒ»¸ö“Ä£°å±àÒëÒýÇ攡£
SmartyÒ²ÒÔ×Ô¶¯»º´æÄ£°åÊä³ö¶øÖøÃû¡£Smarty½«Ä£°åµÄÊä³öÄÚÈÝ»º´æ£¬ÕâÑù¾ÍÊ¡ÏÂÁËÔÚ´ÓÊý¾ÝÔ´ÖØÐÂÈ¡»ØÊý¾ÝʱµÄϵͳ֧³ö¡£Êý¾ÝԴͨ³£¶¼ÊÇÍⲿµÄ£¬¶øÇÒºÜÂý£¬ËùÒÔÒ²¾­³£ÊÇÄãµÄÓ¦ÓõÄÆ¿¾±£¬ÈçͬԶ³ÌÊý¾ÝÔ´Ò»Ñù¡£Smarty½«ÄãÄ£°åµÄÊä³öÁ¬Í¬´ÓÊý¾ÝÔ´È¡µÃµÄÊý¾ÝÒ»Æ𻺴棬ÕâÑù²¢²»ÊÇÿ´ÎÄãµÄÍøÒ³±»·ÃÎÊʱÄã¾ÍÈ¥Á¬½ÓÊý¾ÝÔ´¡£Èç¹ûÄãÓÐÒ»¸ö·´Ó¦ÂýµÄÊý¾ÝÔ´·þÎñÆ÷»òÕ߶ÔÊý¾ÝÔ´ÓжàÖÖÇëÇó£¬ÕâÖÖ»º´æ¹¦ÄÜ»á´ó´óÌáÉýÍøÒ³µÄÐÔÄÜ¡£
µ±È»£¬ÓÐʱÄã²¢²»ÏñÈÃÄ£°åµÄÊä³ö±»»º´æ£¬±ÈÈç˵֤ȯ±¨¼Û»ú»òÕßÄ㲻ͣµÄÐÞ¸ÄÄãµÄÊý¾ÝÔ´²¢ÆÚÍûÁ¢¿ÌÔÚÍøÒ³ÉÏ·´Ó¦³öÕâЩ±ä»¯¡£ÕâЩ¶¼Ã»ÎÊÌ⣡SmartyͬÑùÔÊÐíÄ㶨ÒåÄÄЩÐèÒª»º´æÄÄЩ²»ÐèÒª¡£ÊÂʵÉÏÄã¿ÉÒÔ½«»º´æºÍûÓлº´æµÄÄÚÈÝ·ÅÔÚÒ»¸öÒ³ÃæÉÏ£¬ÒòΪSmarty¿ÉÒÔ׼ȷµÄ¶¨Òåʲô¿ÉÒÔ±»»º´æ£¨±ÈÈçÍòÄê²»±äµÄµ¼º½À¸£©ºÍʲô²»¿ÉÒÔ±»»º´æ£¨±ÈÈçÍøÒ³µ×²¿µÄ֤ȯ»ú£©¡£ÄãÒ²¿ÉÒÔÉ趨»º´æÄÚÈݵÄÓÐЧÆÚ£¬ÕâÑùÄ£°åµÄÄÚÈÝÖ»»á±»»º´æÒ»¶Îʱ¼ä¡£ÕâÑùÄã¾Í¿ÉÒÔÔÚʵʱ¸üеĴóÁ¿×ÊѶºÍ¸ü¿ìËÙµÄÍøÕ¾ÌåÑéÖÐÕÒµ½Æ½ºâ¡£
ÓÐÒ»µãÐèÒªÖ¸³öµÄÊÇ£¬ÕâÖÖ»º´æ¹¦ÄܺÍZend Cache»òÕßÆäËûµÄPHP¼ÓËÙÆ÷ÍêÈ«²»Ò»Ñù¡£ÀàËÆZend CacheµÄ»º´æ¹¤¾ß¶¼Êǽ«PHP½Å±¾±àÒëºó²úÉúµÄ×Ö½ÚÂ뻺´æÆðÀ´£¬¶øSmarty»º´æµÄÊÇÄãµÄÄ£°åµÄÊä³ö£¨Æäʵ¾ÍÊÇÒ»ÖÖPHP½Å±¾£©¡£Ò


Ïà¹ØÎĵµ£º

PHPÒ³Ãæ´«ÖµµÄ6ÖÖ»ñÈ¡·½·¨

1¡¢PHP4ÒÔºó»ñÈ¡´«ÖµµÄ·½·¨
Ò»°ãÔÚÒ³ÃæÖд«Öµ³£¼ûµÄÊÇPOST¡¢GETºÍCOOKIE¼¸ÖÖ£¬ËùÒÔÏÂÃæÎÒÒ²Ö÷Òª½éÉÜÕ⼸ÖÖ¡£PHP4ÒԺ󶼲ÉÓõÄÊÇ$_POST¡¢$_GETµÈÊý×éÀ´»ñÈ¡ÍøÒ³´«Öµ¡£ÔÚPHP3.0¼°ÒÔÏ°汾¶¼ÊÇÓõÄÊÇ$HTTP_POST_VARS¡¢$HTTP_GET_VARSµÈÊý×飬¾ßÌå´úÂëÈçÏÂ
echo $_POST['dopost'];
?>
< form action="weste_net.php" ......

Dompdf for PHP & Replace Url to link

If you want to put some big table in the pdf file, you may got the layout messy. One way to solve the problem is to change the paper size.  In "includes/cpdf_adapter.cls.php", Change the size you used in the array to whatever you want.
One tip: Replace Url into Clickable link.
$tex ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ