php ÕýÔò±í´ïʽ×ܽá
Àý£º
ÒªÇóÆ¥Åä±êÌâ
<div class="detail-hd">
<h3>
Îå»Ê¹Ú 2010´º×°ÐÂƷʱÉÐTÐô ³¤Ðä Å®×°³¤¿îTÐô ÈÈÂôº«°æ³¤T ÌؼÛ
</h3>
$reg="|<div class=\"detail-hd\">[\n\r\t]*<h3>[\n\r\t]*(.*)[\n\r\t]*</h3>|";
preg_match_all ($reg,$html,$out, PREG_PATTERN_ORDER);
/*
foreach ($out as $value){
foreach ($value as $value2){
echo ($value2."<br>");
}
}
*/
echo ($out[1][0]."<br>");
×ܽ᣺
1¡¢htmlÖеÄÁ½¸ö¼âÀ¨ºÅ²»ÓÃתÒå"<>"
2¡¢"ðºÅҪתÒ壬PHPÓï·¨ÐèÒª
3¡¢ÒªÅäÖÃÀ¨ºÅ(±¾ÉíҪתÒå\(£¬²»×ªÒå¾ÍÊÇÕýÔòµÄ·Ö×é
4¡¢·´Ð±¸Ü²»ÓÃתÒå/
6¡¢Æ¥Åä»Ø³µ[\n\r\t]
7¡¢Æ¥Åä°üÀ¨»Ø³µÔÚÄÚµÄËùÓÐ×Ö·û[\s\S]
8¡¢µ¥ÒýºÅ²»ÓÃתÒå/
9¡¢preg_match_all µÄ½ç¶¨·û¿ÉÒÔÊÇ|»òÕß#£¬Èç¹ûÓÃ|£¬¾Í²»Äܱí´ï·ÖÖ§Ìõ¼þÁË£¬¹ÊÓÃ#ºÃЩ£¬È磺
$reg="#http://.*?(\.jpg|\.gif)#i";
preg_match_all ($reg,$g_attributes,$out, PREG_PATTERN_ORDER);
10¡¢ikmb
Ïà¹ØÎĵµ£º
PHP³ÌÐòºÍMySqlÊý¾ÝÂÒÂëÎÊÌâÔÒò¼°½â¾ö
ÂÒÂëÎÊÌâ¼òµ¥Ëµ¾ÍÊÇÊý¾Ý¿âдÈë¶ÁÈ¡£¬ÍøÒ³Îļþ£¬ÍøÒ³ÏÔʾʱ¼¸¸ö»·½ÚµÄ±àÂë²»Ò»ÖÂÔì³ÉµÄ¡£
ÂÒÂëÎÊÌâ
дÈëʱ£ºÒ³ÃæÌáȡдÈëÊý¾Ý±àÂëºÍдÈëÊý¾Ý¿âʱ±àÂë²»Ò»ÖÂ
¶Áȡʱ£º¶ÁÈ¡ºóËùÓñàÂëÓëÊý¾Ý¿âдÈëʱ²»Ò»ÖÂ
ÏÔʾʱ£º±àÂëÓëÊý¾Ý¿â¶ÁÈ¡ºóµÄÊý¾Ý²»Ò»ÖÂ
ºÜÏÔȻֻÓÐÈýÕ߶¼Í³Ò»²ÅÐУ ......
1 ´úÀí£¨Proxy£©ºÍίÅÉ£¨Delegate£©µÄÇø±ð
http://hi.baidu.com/thinkinginlamp/blog/item/2297a7efcb52a31afdfa3cc2.html
2 ¿ªÐÄÅ©³¡¼Ü¹¹½éÉÜ
http://www.javaeye.com/wiki/facebook/1766-five-minutes-happy-farm-structure-introduced
http://www.w2blog.net/view/455.html
3 SmugMug µÄ¼Ü¹¹½éÉÜ
http://www.w2blo ......
<?php
//ʹÓÃfunction¹Ø¼ü×Ö¶¨Òå·½·¨
function num($value,$value2 = 'ÄúºÃ£¡'){
echo $value.$value2;
}
//µÚÒ»´Îµ÷ÓÃ
num("ÕÅÈý");
//µÚ¶þ´Îµ÷ÓÃ
//¿ÉÒÔ¿´³ö£¬¸Ã·½·¨¶¨Òåʱ£¬µÚ¶ ......
<?php
function myFun(){
echo "hello,ÕÅÈý";
}
//ÀûÓÃfunction_exists·½·¨ÅжÏ×Ô¶¯ÒÔ·½·¨ÊÇ·ñ´æÔÚ
//¸Ã·½·¨²ÎÊýΪҪÅжϵÄ×Ô¶¨Òå·½·¨µÄ·½·¨Ãû£¬¿ÉдΪ
//"myFun"»òmyFun
if(function_exists(myFun)){
echo "´æÔÚ ......
×¢£ºÕâÊÇ´ÓPHPCMS¿ª·¢ÎĵµÀï¿´µ½±àÂë¹æ·¶£¬ËäÃûΪPHPCMSµÄ¿ª·¢¹æ·¶£¬µ«ÎÒ¾õµÃËùÓеÄPHP±à³Ì¶¼¸ÃÈç´Ë¡£Ð´ÁËÄÇô¶àPHP£¬ºÜ¶à±àÂë¶ÔÕÕÕâ¹æ·¶¶¼¸Ð¾õǷȱºÜ¶à£¬½ñºóÒ»¶¨Òª¶ÔÕÕ¾ÀÕý¡£
Phpcms ±àÂë¹æ·¶
1. ÒýÑÔ…. 2
2. ÊÊÓ÷¶Î§…. 2
3. ±ê×¼»¯µÄÖØÒªÐԺͺô¦…. 3
4. PHP±àÂë¹æ·¶ÓëÔÔò…. 3
4. ......