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

PHP£¬Ìæ»»¶à¸öÎļþÖеÄÎı¾

ÐèÇó£º
    ÐèÒª¶ÔÁ½¸öĿ¼ÖеÄÎļþÄÚÈݽøÐвéÕÒÌæ»»£¬Á½¸öĿ¼²éÕÒÌæ»»µÄÄÚÈݲ»Ò»Ñù¡£
    ÊµÏÖÖÐ×¢Ò⼸µã£º
    £¨1£©º¯ÊýµÝ¹éµ÷Óã¬À´¼ìË÷×ÓĿ¼£»
    £¨2£©º¯ÊýÃû¿ÉÒÔÒÔ²ÎÊýÐÎʽ´«µÝ£»
    £¨3£©Ó㿽øÐзÇÌ°À·Æ¥Å䣻
    £¨4£©Ã¿ÐÐÆ¥Åä²éÕÒ¡¢Õû¸öÎļþÄÚÈÝÆ¥Åä²éÕÒ
<?php
//loopdir('dir1', 'repfile1');
loopdir('dir2', 'repfile2');
function loopdir($dir, $fun){
$dp = opendir($dir);
chdir($dir);
readdir($dp); //Åųýµ±Ç°Ä¿Â¼ "."
readdir($dp); //ÅųýÉϲãĿ¼ "."
while( $v = readdir($dp) ){
if( is_dir($v) ) loopdir($v, $fun);
else $fun($v);
echo $v."<br>";
}
chdir("..");
}
function repfile1($filename){
$content = file_get_contents($filename);
if( empty($content) ){
echo "can't open file to read: ".$filename;
return ;
}

//¼Ó£¿ºÅÊǽøÐзÇÌ°À·Æ¥Å䣬ÒÔÃâÆ¥ÅäµÄ¿éÌ«´ó
$content = preg_replace('/if \(!validateEmail\((.*?)"Email address is not valid(.*?})/s',
'if (!validateEmail(\\1"Email address is not valid\\2else if (!isNyhEmail(\\1"Can not add NYH email addresses.\\2',
$content);
writenewfile($filename, $content);
}
function repfile4615($filename){
$fpr = fopen($filename, 'r');
if( empty($fpr) ){
echo "can't open file to read: ".$filename;
return ;
}

$newContent = '';
while( $line = fgets($fpr) ){
$line = preg_replace('/^(.*)\$var_kitchen_dishwasher = "kitchen".\$kitchen_ind."_dishwasher";/s',
'\\1$var_kitchen_dishwasher = "kitchen".\$kitchen_ind."_dishwasher";
\\1$var_kitchen_oven = "kitchen".$kitchen_ind."_oven";
\\1$var_kitchen_fridge = "kitchen".$kitchen_ind."_fridge";', $line);
$newContent .= $line;
}
fclose($fpr);
writenewfile($filename, $newContent);
}
function writenewfile($filename, $content){
$fpw = fopen($filename, 'w');
if( empty($fpw) ){
echo "can't open file to write: ".$filename;
return ;
}
fwrite($fpw, $content);
fclose($fpw);
}
?>


Ïà¹ØÎĵµ£º

phpµ÷ÓÃmysql´æ´¢¹ý³Ì·µ»Ø¶à¸ö½á¹û¼¯µÄ´¦Àí

 ·µ»ØÒ»¸ö½á¹ûÈ«ÊÀ½ç¶¼ÖªµÀÔõô´¦Àí£¬¹Ø¼üÊÇ·µ»Ø¶à¸ö½á¹û¼¯¾Í²»ºÃ°ìÁË£¬ÏÂÃæÓÐÒ»½â¾ö°ì·¨
´æ´¢¹ý³Ì´úÂë
DELIMITER $$;
DROP PROCEDURE IF EXISTS `test`.`sp_test`$$
CREATE PROCEDURE `test`.`sp_test` ()
BEGIN
    select * from `user`.`user` limit 0, 50;
    select coun ......

ÔõÑù½â¾öPHPÖÐÎÄÂÒÂëÎÊÌâ

×î½üÔÚCSDN¸Õ¿ªÁËÕâ¸ö²©¿Í£¬Ã»Ê²Ã´Ê±¼ä°ÑÒÔǰдµÄÎÄÕ°á¹ýÀ´£¬Ö»ÄÜÓпÕÂýÂýÀ´ÁË¡£
 --------------------------ÕâƪÎÄÕ½öÏ׸øÄÇЩһֱÔÚPHPÂÒÂëÎÊÌâÉÏÀ§»óµÄÈË¡£
A.Ê×ÏÈ˵ÏÂHTMLÖÐÎÄÂÒÂëÎÊÌâµÄ½â¾ö·½·¨¡£
±ÈÈçÓиöindex.htmlµÄÒ³Ã棨ÕâÀïÊÇÖ¸ÕæÕýµÄ¾²Ì¬Ò³Ã棬Ð޸ķþÎñÆ÷µÄ……α¾²Ì¬µÄÇë¿´·½°¸B£©
1. ......

PHP·¾¶ÎÊÌâ

<?
php define('__TYPECHO_ROOT_DIR__', dirname(__FILE__));
define('__TYPECHO_PLUGIN_DIR__', '/usr/plugins');
@set_include_path(get_include_path() . PATH_SEPARATOR . __TYPECHO_ROOT_DIR__ . '/var' . PATH_SEPARATOR . __TYPECHO_ROOT_DIR__ . __TYPECHO_PLUGIN_DIR__);
ÄÜÏêϸµÄ½âÊÍÕâ¸öº¯ÊýÂ𣿵±È»Î ......

phpС±Ê¼Ç


<!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@ËÎÌå" ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ