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

PHP ÕýÔò±í´ïʽ²éÕÒ×Ö·û´®

<?php
set_time_limit(0);
$url='http://item.taobao.com/auction/item_detail.htm?xid=0db2&item_num_id=4512430274&cm_cat=50000671&pm2=1';
$ch = curl_init();
$timeout = 10;
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$html = curl_exec($ch);
curl_close($ch);
$reg="|ºÃÆÀÂÊ£º[\s\S]*<strong>(\d{0,5}[.]\d{0,5})%</strong>|";
preg_match_all ($reg,
$html,
$out, PREG_PATTERN_ORDER);
/*
foreach ($out as $value){
foreach ($value as $value2){
if(strlen($value2)<20)
echo ($value2."<br>");
}
}
*/
echo $out[1][0];

//ikmb
?>


Ïà¹ØÎĵµ£º

PHP rsyncÃüÁî½éÉÜ

rsync ÊÇÒ»¿î¸ßЧµÄÔ¶³ÌÊý¾Ý±¸·ÝºÍ¾µÏ󹤾ߣ¬¿É¿ìËÙµØͬ²½¶ą̀Ö÷»ú¼äµÄÎļþ£¬Æä¾ßÓÐÈçÏÂÌØÐÔ£º
Ö§³ÖÁ´½Ó¡¢ËùÓÐÕß¡¢×éÐÅÏ¢ÒÔ¼°È¨ÏÞÐÅÏ¢µÄ¿½±´£»
ͨ¹ýÔ¶³Ì shell£¨ssh, rsh£©½øÐд«Ê䣻
ÎÞÐëÌØÊâȨÏÞ¼´¿É°²×°Ê¹Óã»
Á÷Ë®ÏßʽÎļþ´«Êäģʽ£¬Îļþ´«ÊäЧÂʸߣ»
Ö§³ÖÄäÃû²Ù×÷£»
ͨ¹ýÔ¶³Ì shell ·½Ê½£º
rsync [OPTION] [USE ......

PHP autoload»úÖÆÏê½â

(1) autoload»úÖƸÅÊö
ÔÚʹÓÃPHPµÄOOģʽ¿ª·¢ÏµÍ³Ê±£¬Í¨³£´ó¼ÒÏ°¹ßÉϽ«Ã¿¸öÀàµÄʵÏÖ¶¼´æ·ÅÔÚÒ»¸öµ¥¶ÀµÄÎļþÀÕâÑù»áºÜÈÝÒ×ʵÏÖ¶ÔÀà½øÐи´Óã¬Í¬Ê±½«À´Î¬»¤Ê±Ò²ºÜ±ãÀû¡£ÕâÒ²ÊÇOOÉè¼ÆµÄ»ù±¾Ë¼ÏëÖ®Ò»¡£ÔÚPHP5֮ǰ£¬Èç¹ûÐèҪʹÓÃÒ»¸öÀֻ࣬ÐèÒªÖ±½ÓʹÓÃinclude/require½«Æä°üº¬½øÀ´¼´¿É¡£ÏÂÃæÊÇÒ»¸öʵ¼ÊµÄÀý×Ó£º
CODE:
/* ......

½« Apache ¼° PHP µÄ°æ±¾Òþ²Ø

µ¼¶Á£º ¡¡
¡¡Apache: ¡¡
¡¡¿ªÆô httpd.conf£¬¼ÓÈëÒÔÏÂÁ½ÐÐ: ¡¡
¡¡QUOTE: ¡¡
¡¡ServerTokens ProductOnly ¡¡
¡¡ServerSignature Off ¡¡
¡¡PHP: ¡¡
¡¡Òþ²Ø PHP °æ±¾¾ÍÊÇÒþ²Ø "X-Powered-By: PHP/5.1.2-1+b1" Õâ¸ö£¬¿ªÆô php.ini£¬¼ÓÈë: ¡¡
¡¡QUOTE: ¡¡
¡¡expose_php = Off ¡¡
¡¡Apache ½ûֹĿ¼ä¯ÀÀ: ¡¡
¡¡½ûֹĿ ......

windows7Ï°²×°apache+php+mysqlÎÊÌâ¼Ç¼

×î½üÐÂÂòÁ˸öµçÄÔ£¬ÏµÍ³ÊÇwindows7£¬window7ÔÚ½çÃ棬¹¦ÄÜ·½Ã涼ͦÈÃÈËÂúÒâµÄ£¬¸Ð¾õºÜˬ£¬²»Ë¬µÄÊÇÓÖÒªÖØа²×°»·¾³ÁË¡£
ËùÓÐÈí¼þ¾ù°²×°ÔÚF:\server\ÏÂ
apacheĿ¼£ºF:\server\apache2.2
phpĿ¼£ºF:\server\php
msyqlĿ¼£ºF:\server\mysql
Ò»¡¢°²×°apache
°²×°apacheµÄ°æ±¾ÊÇ£ºhttpd-2.2.15-win32-x86-no_ssl.msi
° ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ