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

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


Ïà¹ØÎĵµ£º

¶à¼üÖµcookie£¨phpÖÐcookie´æÈ¡Êý×飩

cookieĬÈϲ»ÄÜ´æÊý×飬ËùÒÔÏÂÃæµÄд·¨ÊÇ´íÎóµÄ¡£
 
<?php
$arr = array(1,2,3);
setcookie('a',$arr);
$arr = array(1,2,3);
setcookie('a',$arr);
?>
±¨´íÈçÏ£º
Warning: setcookie() expects parameter 2 to be string, array given in
µ«ÊÇPHP¿ÉÒÔ°ÑͬÃûÇÒºóÃæÒÔ[]½áβµÄcookie½âÎöΪÊý×é¡£ÔÚ ......

phpºÍjavaÉÏ´«ÎļþµÄ·½·¨

javaÉÏ´«Îļþ
ÐèÒªµÄµÚÈý·½jar°üÓУ¨ÕâÀïʹÓÃapacheµÄ£©
apacheµÄcommons-fileupload£¨ÉÏ´«Óã©£¬commons-io £¨listenerÇåÀíÀàÓã© £¬ commons-beanutils£¨¿ÉÑ¡£©
¾ßÌå²Ù×÷
FileItemFactory factory = new DiskFileItemFactory();
ServletFileUpload upload = new ServletFileUpload(factory);
if(ServletFileUp ......

PHPÖÐhtmlentitiesºÍhtmlspecialcharsº¯ÊýµÄÇø±ð

×öPHP³ÌÐòµÄÈ˶¼ÖªµÀhtmlentitiesºÍhtmlspecialcharsº¯Êý£¬¶¼ÊǸñʽ»¯html´úÂëµÄ£¬µ«ÊÇÕâ¶þ¸öº¯ÊýÊÇ·ñÕæµÄ¹¦ÄÜÒ»ÑùÂ𣿠php³ÌÐòÔ±Ö®¼Ò ÕâÁ½¸öº¯ÊýÔÚ¸ñʽ»¯´øÓÐÓ¢ÎÄ×Ö·ûµÄhtml´úÂëµÄʱºò»ù±¾Ã»É¶ÎÊÌ⣬µ«ÊÇhtmlentities¶ÔÖÐÎÄ×Ö·ûÒ²²»·Å¹ý£¬ÕâÑùµÃ³öÀ´µÄ½á¹ûÊÇÖÐÎÄ×Ö·û²¿·Ö±äΪһ¶ÑÂÒÂë¡£µ±Ê±×öÓ¢ÎÄÕ¾µÄʱºò¸ù±¾¾Íû¾õ²ìµ ......

PHP ÖÐÇÉÓÃÊý×é½µµÍ³ÌÐòµÄʱ¼ä¸´ÔÓ¶È

OpenX adserver version 2.8.1 and lower is vulnerable to remote code
execution. To be exploited, this vulnerability requires banner / file
upload permissions, such as granted to the 'advertiser' and
'administrator' roles.
This vulnerability is caused by the (insecure) file upload mechanism of
af ......

PHP tempname()º¯ÊýÈÆ¹ýsafe_mode°²È«ÏÞÖÆÂ©¶´

BUGTRAQ ID: 36555
CVE ID: CVE-2009-3557
PHPÊǹ㷺ʹÓõÄͨÓÃÄ¿µÄ½Å±¾ÓïÑÔ£¬ÌرðÊʺÏÓÚWeb¿ª·¢£¬¿ÉǶÈëµ½HTMLÖС£
PHPµÄtempnam()ÖеĴíÎó¿ÉÄÜÔÊÐíÈÆ¹ýsafe_modeÏÞÖÆ¡£ÒÔÏÂÊÇext/standard/file.cÖеÄÓЩ¶´´úÂë¶Î£º
PHP_FUNCTION(tempnam)
{
char *dir, *prefix;
int dir_len, prefix_len;
size_t p_len;
char ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ