php»ù´¡Ó¦ÓãºphpÅúÁ¿×ª»»Îļþ±àÂë
±éÀúĿ¼Îļþ£¬Ìæ»»±àÂ벿·Ö£¬É¾³ýÔÎļþ£¬ÔÙÖØÐÂתÂëÔÎļþÄÚÈÝ£¬ÖØÐÂÉú³ÉÐÂÎļþ¡£
function explorerdir($sDir){
static $aTempArr=array();
$dp=opendir($sDir);
while ($sFileName = readdir($dp)){
if ($sFileName !='.' && $sFileName !='..'){
$sPath=$sDir."/" . $sFileName;
if ( is_dir($sPath)){
explorerdir($sPath);
} else {
// $filetime=date("Y-m-d H:i:s",filectime("$path"));
// $fp=$path.",".$filetime;
$fp=$sPath;
$aTempArr[]=$fp;
}
}
}
closedir($dp);
return $aTempArr;
}
$aFiles = explorerdir("D:/wamp/www/dedecms/templets/default");
foreach($aFiles as $iKey => $sFiles) {
$sContent = file_get_contents($sFiles);
$sContent = str_ireplace('<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />', '<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />', $sContent);
$sContent = iconv("UTF-8", "gb2312", $sContent);
unlink($sFiles);
file_put_contents($sFiles, $sContent);
unset($sContent);
}
ÔÌùµØÖ·£ºhttp://topic.csdn.net/u/20100407/10/b5fe2152-d5b2-42a5-aa3f-cf6c499af2f1.html
Ïà¹ØÎĵµ£º
http://blog.developers.api.sina.com.cn/?p=264
×î½üMemcacheDBÓʼþÁбíºÍÑз¢²¿ÄDZßͬʱ¨¸æPHPµÄmemcache¿Í»§¶Ëphp-memcache¾³£³ö ÏÖ¶ÏÁ¬½ÓµÄÎÊÌ⣺
PHP Notice: Memcache::get(): Server ………. (tcp 11211) failed with: Failed reading line from stream (0) with pecl-memcache 3.*
&h ......
¼¯³ÉÅäÖÃ
ÔÚÅäÖÃEclipse֮ǰ£¬Ê×ÏÈÐèÒªÒ»¸öApache+PHPµÄ»ù´¡»·¾³£¬
¡¡¡¡¿ÉÒÔ×°wampp»òphp home£¬ËüÃǶ¼ÊǼ¯³É»¯°²×°£¬±È½Ï·½±ã£¬ÏÂÔصØÖ·ÈçÏ£º
¡¡¡¡wampp2.2
¡¡¡¡php home
¡¡¡¡
¡¡¡¡½¨Òé×°wampp2.2£¬¼¯³ÉApache,MySQL,Perl,PHP¡£¶øÇÒ½âѹËõ¾Í¿ÉÓã¬ÎÒ¾ÍÓÃËüͦ·½±ãµÄ¡£
¡¡¡¡ÏÂÃæÎÒ¾Í ......
ÔÚlinuxÏÂͨ¹ýsvn¸üÐÂÁËÒ»¸öphpÎļþ£¬Ä¿µÄÊÇÏëͨ¹ýÖ´ÐÐÕâ¸öÎļþÀ´¶ÁÊý¾Ý²åÈëµ½Êý¾Ý¿â¡£ÔÚÆäÖеļ¸Ì¨Ö´ÐÐûÓÐÎÊÌ⣬ÆäÖÐһ̨¾Í·¢ÏÖÁËCould not open input fileÕâ¸ö´íÎ󣬺óÀ´²éÕÒ×ÊÁϲŷ¢ÏÖÔÀ´ÊÇÎļþ¸ñʽµÄÎÊÌ⣬³ö´íʱÎļþ¸ñʽÊÇdos£¬¿ÉÒÔÔÚviÖÐÓÃ:set ffÀ´²é¿´£¬Èç¹ûÊÇdos¸ñʽ£¬ÄÇôÔòÓÃ:set ff=unixÀ´ÉèÖÃеĸñʽ£¬ÕâÑ ......
<?php
$s = "new string";
//ÏÂÃæË«ÒýºÅ×Ö·û´®ÖеķûºÅ"$"δ×öתÒ壬Òò´Ë$s½«±»Ìæ»»³ÉÆä±äÁ¿µÄÖµ
$str_1 = "Ë«ÒýºÅÖ¸¶¨µÄ×Ö·û´®£¬$s";
//ÏÂÃæË«ÒýºÅ×Ö·û´®ÖеķûºÅ"$"×öÁËתÒ壬Òò´Ë$sÔ·â²»¶¯£¬²»»á±»Ì滻Ϊ±äÁ¿$sµÄÖµ
$str_2 = "Ë«ÒýºÅÖ¸¶¨µÄ×Ö·û´®£¬\$s";
//µ¥ÒýºÅ×Ö·û´®ÖеÄ"$"²»ÓÃ×öתÒå¼´¿ÉÔÑùÊä³ö
$str_3 ......
×î½üÓÐÒ»¸öÏã¸ÛµÄ¾ÆµêÌá³öÐèÇó,Òªµ½¾ÆµêÒµÄÚµÄÉÌÎñÖÐÐÄʵÐмƷÑÉÏÍø, ÌṩÁËÈçϼ¼Êõ·½°¸:
1¡¢Éèһ̨CENTOS5µÄ»úÆ÷×öΪ·ÓÉ£¬°ÑÐèÒª¼Æ·ÑµÄ»úÆ÷¶¼ÉèΪÓô˷þÎñÆ÷×öÍø¹Ø¡£
2¡¢·þÎñÆ÷¿ªÆôIPTABLE£¬Í¨¹ýIPTABLE¿ØÖÆÄܲ»ÄÜʹÓû¥ÁªÍø¡£
¼Ç¼ÏÂÒÔϼ¼ÊõÒªµã:
Ò»¡¢ php¿ÉÒÔͨ¹ýshell_execÀ´Ö´ÐÐshellÖ¸Áµ«iptablesµÄÖ¸ÁîÊÇr ......