phpÖÐsmartyÄ£°æÒýÇæÖеĻº´æÓ¦Óã¡
1,Smarty»º´æµÄÅäÖãº
$smarty->cache-dir="Ŀ¼Ãû"; //´´½¨»º´æĿ¼Ãû
$smarty->caching=true; //¿ªÆô»º´æ£¬ÎªfalseµÄʱºò»º´æÎÞЧ
$smarty->cache_lifetime=60; //»º´æʱ¼ä£¬µ¥Î»ÊÇÃë
2,Smarty»º´æµÄʹÓÃÓëÇå³ý
$marty->display("cache.tpl",cache_id); //´´½¨´øIDµÄ»º´æ
$marty->clear_all_cache(); //Çå³þËùÓлº´æ
$marty->clear_cache("index.php"); //Çå³þindex.phpÖеĻº´æ
$marty->clear_cache("index.php',cache_id); //Çå³þindex.phpÖÐÖ¸¶¨IDµÄ»º´æ
3,SmartyµÄ¾Ö²¿»º´æ
µÚÒ»¸ö£º insert_º¯ÊýĬÈÏÊDz»»º´æ£¬Õâ¸öÊôÐÔÊDz»ÄÜÐÞ¸Ä
ʹÓ÷½·¨£ºÀý×Ó
index.phpÖУ¬
function insert_get_time(){
return date("Y-m-d H:m:s");
}
index.htmlÖÐ,
{insert name="get_time"}
µÚ¶þ¸ö£º smarty_block
¶¨ÒåÒ»¸öblock:smarty_block_name($params,$content, &$smarty){return $content;} //name±íʾÇøÓòÃû
×¢²áblock:$smarty->register_block('name', 'smarty_block_name', false); //µÚÈý²ÎÊýfalse±íʾ¸ÃÇøÓò²»±»»º´æ
Ä£°åд·¨:{name}ÄÚÈÝ{/name}
д³Éblock²å¼þ:
1)¶¨ÒåÒ»¼þ²å¼þº¯Êý:block.cacheless.php,·ÅÔÚsmartyµÄpluginsĿ¼
&nbs
Ïà¹ØÎĵµ£º
ÔÚPHP½øÐÐÐòÁл¯Ê±£¬serialize() ¼ì²éÀàÖÐÊÇ·ñÓÐ __sleep() ,Èç¹ûÓУ¬Ôò¸Ãº¯Êý½«ÔÚÈκÎÐòÁл¯Ö®Ç°ÔËÐС£¸Ãº¯Êý±ØÐë·µ»ØÒ»¸öÐèÒª½øÐÐÐòÁл¯±£´æµÄ³ÉÔ±ÊôÐÔÊý×飬²¢ÇÒÖ»ÐòÁл¯¸Ãº¯Êý·µ»ØµÄÕâЩ³ÉÔ±ÊôÐÔ. ¸Ãº¯ÊýÓÐÁ½¸ö×÷ÓÃ: µÚÒ». ÔÚÐòÁл¯Ö®Ç°,¹Ø±Õ¶ÔÏó¿ÉÄܾßÓеÄÈκÎÊý¾Ý¿âÁ¬½ÓµÈ. µÚ¶þ. Ö¸¶¨¶ÔÏóÖÐÐèÒª±»ÐòÁл¯µÄ³ÉÔ±ÊôÐÔ,È ......
javaÉÏ´«Îļþ
ÐèÒªµÄµÚÈý·½jar°üÓУ¨ÕâÀïʹÓÃapacheµÄ£©
apacheµÄcommons-fileupload£¨ÉÏ´«Óã©£¬commons-io £¨listenerÇåÀíÀàÓã© £¬ commons-beanutils£¨¿ÉÑ¡£©
¾ßÌå²Ù×÷
FileItemFactory factory = new DiskFileItemFactory();
ServletFileUpload upload = new ServletFileUpload(factory);
if(ServletFileUp ......
1.Èç¹ûÒ»¸ö·½·¨¿É¾²Ì¬»¯£¬¾Í¶ÔËü×ö¾²Ì¬ÉùÃ÷¡£ËÙÂÊ¿ÉÌáÉýÖÁ4±¶¡£
2.echo ±È print ¿ì¡£
3.ʹÓÃechoµÄ¶àÖزÎÊý£¨Òë×¢£ºÖ¸ÓöººÅ¶ø²»ÊǾäµã£©´úÌæ×Ö·û´®Á¬½Ó¡£
4.ÔÚÖ´ÐÐforÑ»·Ö®Ç°È·¶¨×î´óÑ»·Êý£¬²»ÒªÃ¿Ñ»·Ò»´Î¶¼¼ÆËã×î´óÖµ¡£
5.×¢ÏúÄÇЩ²»ÓõıäÁ¿ÓÈÆäÊÇ´óÊý×飬ÒÔ±ãÊÍ·ÅÄÚ´æ¡£
6.¾¡Á¿±ÜÃâʹÓÃ__get£¬__se ......
PHP ÖÐÇÉÓÃÊý×é½µµÍ³ÌÐòµÄʱ¼ä¸´ÔÓ¶È
±¾ÎÄÖ÷ÒªÊǽéÉÜÔÚ PHP µÄ±à³ÌÖУ¬ÈçºÎÇÉÓÃÊý×éÀ´½µµÍÒò¶à²ãÑ»·¶øÒýÆðµÄʱ¼ä¸´ÔӶȵÄÎÊÌâ¡£ÌرðÊǵ±³ÌÐòÐèÒª¶à´ÎÓëÊý¾Ý¿â½»»¥Ê±£¬Óô˷½·¨À´ÓÅ»¯ÄãµÄ´úÂ룬½«»á´ø¸øÒâÏë²»µ½µÄЧ¹û¡£
ͨ³£¿ª·¢ÈËÔ±ÔÚд³ÌÐòµÄʱºò£¬ÍùÍùÊÇ°ÑÒѾÉè¼ÆºÃ»òÕß¹¹Ë¼ºÃµÄÔËËãÂß¼£ ......