»ð³µÍ·discuz6.1ÍêÃÀ²É¼¯µÄphp½Ó¿ÚÎļþ
»ð³µÍ·¹Ù·½ÌṩµÄdiscuz6.1µÄphp½Ó¿Ú±È½Ï´Ö²Ú£¬»ù±¾²»ÄÜÂú×ãÐèÒª£¬±¾ÈËÔڲɼ¯µÄ¹¤×÷ÖÐʹÓõIJɼ¯½Ó¿ÚÎļþÈçÏ£º
PS£º¶ÔÔÎļþµÄÐ޸Ľϴó,³ÌÐòÖÐ×¢ÊÍÒѾºÜÏ꾡£¬ÕâÀï¾Í²»¶à˵ÁË¡£
<?php
// header('Content-Type:text/html;charset=UTF-8');
//if(function_exists("mb_convert_encoding")){
// $tmp = checkAndTranslate("ʹÓÃÇ°Ç뽫¸ÃÎļþÖ±½ÓÉÏ´«ÖÁÂÛ̳¸ùĿ¼", 0);
// header('Content-Type:text/html;charset=UTF-8');
// print($tmp);
//}else{
// print("NO");
//}
// exit("this.line=".__line__);
/*
ÎļþÃû£ºlocoyonline_for_discuz610.php
*ʹÓÃÇ°Ç뽫¸ÃÎļþÖ±½ÓÉÏ´«ÖÁÂÛ̳¸ùĿ¼
*±¾ÎļþΪGBK±àÂ룻
*´¦Àíºóµ¼ÈëÊý¾Ý¿âµÄ±àÂëΪ£ºutf-8£»
*ÐèÒªÌæ»»×Ö·ûʱ£¬Ðè°Ñreplace.txt¸´ÖƵ½Í¬Ä¿Â¼Ï£»
*/
//´¦ÀíÈ«¾Ö±äÁ¿
//foreach($_POST as $key => $value){
//$$key = $value ;
//print($key.' = '.$value.'\n');
//}
//var_dump($_POST);
//exit('end-0');
// ÐèÒª²åÈëµÄÊý¾Ý±í
// 1.cdb_threads
// 2.cdb_rewardlog // ok ÐüÉͼǼ±í
// 3.cdb_mythreads
// 4.cdb_posts
// 5.cdb_tags _update
// 6.cdb_threadtags
// 7.cdb_forums _update
// 8.cdb_members _update ok ¸ü¸ÄÐüÉͱí
//done end !
$user_list = file('./makeuser/username.txt');
// Ëæ»ú·¢ÌûµÄÓû§Ãûµ¥£¬±ØÐëÊÇÒѾע²áµÄ
// ¹ØÓÚÅúÁ¿×¢²áÓû§Ãû¿ÉÒԲο¼ Discuz 6.0+ ÅúÁ¿×¢²áÓû§Ãû
$user_list = array_map("curlAndCopy", $user_list);
function curlAndCopy($a){
return trim($a);
}
$replyusers = implode("|",$user_list);
//´¦Àí»Ø¸´µÄ¸ñʽ
function trimAndCurl($str){
$str = preg_replace('/\n\s{5,}/','', $str , 1);
$str = trim($str);
$str = checkAndTranslate($str);
return $str;
}
function checkAndTranslate($mess, $if_replace =1, $in_char_type='GBK', $out_char_type='UTF-8'){
//if replace ?
if($if_replace){
$mess = curlAndReplace($mess);
}
//if chinese GBK ?
&
Ïà¹ØÎĵµ£º
<?php
/*
*PHP¹ÜÀíMYSQLµÄÊý¾Ý¿âÀà
ʹÓ÷½·¨£º$dbConn = new DbConn([$Êý¾Ý¿âÃû(¿ÉÑ¡)]);
ÔÊÐí·µ»ØµÄ·½·¨£º
Execute($sql) //Ö´ÐÐSQLÓï¾ä£¬Ã»Óзµ»ØÖµ;
getRs($sql) //·µ»Ø²éѯÓï¾äµÄ¼Ç¼£¬Ò»Ìõ;
getRsArray($sql) //·µ» ......
ʵÀýÓ¦Óãº
1<?
2require_once('../libs/classes/page.class.php');
3$page=new page(array('total'=>1000,'perpage'=>20));
4echo 'mode:1<br>'.$page->show();
5echo '<hr>mode:2<br>'.$page->show(2);
6echo '<hr>mode:3<br>'.$page->show(3);
7echo '&l ......
¼Æ»®ÈÎÎñ£¨Schedule Task£©ÊÇwindowsƽ̨ÉϺÍcronÀàËƵÄÒ»¸ö³ÌÐò£¬µ±È»¹¦ÄÜÉϲîÁ˺ܶàÁË¡£
ÒòΪÐèҪÿ¸öСʱÔËÐÐÒ»¸öPHP³ÌÐò£¬ÊÖ¶¯²Ù×÷²»ÏÖʵÁË¡£
Ê×ÏÈÔÚcmdϲâÊÔ£¬ÀýÈ磺 c:\appserv\php5\php.exe "C:\AppServ\www\temp2.php"
ÓÐÒ»µãҪעÒâ¾ÍÊÇÈç¹ûÄǸöPHPÒýÓÃÁËÆäËûÒ³Ã棬ÐèÒªÌṩ¾ø¶Ô·¾¶ÁË£¬ÖÁÉÙÎҵIJâÊÔ ......
phpÊÇÒ»ÖÖ¿ª·ÅÔ´´úÂ롢ǶÈëʽ·þÎñÆ÷¶ËµÄ½Å±¾ÓïÑÔ¡£
1¡¢PHPÒ²ÊÇǶÈëʽCGIÓïÑÔ¡£PHP4ÊDZ»·â×°ÔÚ±ê¼ÇÖеÄǶÈëʽÓïÑÔ£¬Äã¿ÉÒÔÇáÒ×µØÔÚPHPºÍHTMLÖ®¼ä½øÐÐת»»£¬¶ø²»±ØʹÓôóÁ¿´úÂëÒÔÊä³öHTML¡£Í¨ÓÃÍø¹Ø½Ó¿Ú(CGI)ÔÊÐíÓû§±àдÄܲúÉúHTMLÒÔ¼°¶¯Ì¬´¦ÀíÍøÒ³Êý¾ÝµÄ¼ÆËã»ú³ÌÐò¡£PHP¿ÉÒÔ±»¹éÀàΪCGI¡£
2¡¢Ó¦ÓÃPHPµÄÈý¸öÁìÓò£º(1)·þÎñÆ ......
ÆäʵÕâƪÎÄÕÂÒ²²»ÄÜËã×÷ÊÇÔ´´£¬Ö»ÊÇÔÚÔ×÷ÕߵĻù´¡ÉÏÐ޸ĵıȽ϶࣬¼¸ºõÖØдÁËÒ»±é¡£
<?php
/**
*ÔÚÔ×÷ÕߵĻù´¡ÉÏÐ޸ĵģ¬ºÇºÇ£¬²»¹ýÍü¼ÇÁËÔ×÷ÕßÊÇËÁË£¬
*Èç¹ûÔ×÷Õß¿´µ½µÄ»°£¬¸øÎÒÒ»¸öÌáʾ£¬o(∩_∩)o...
*ÎÒµÄblog:http://etongchina.blogcn.com
*ÎÒµÄÓÊÏä:etongchina@gmail.com
**/
fu ......