<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_66335"> <div class="blockcode"> <div id="code_x0y"><ol><li> <?php <li>$p = '/<img . alt="PHP提取页面第一张图为缩略图的代码 " >/i';<li>preg_match_all($p,$str,$match);</li> <li>print_r($match[1][0]);</li> <li>?></li></img.> </li></ol></div> <em onclick="copycode($('code_x0y'));">复制代码</em> </div> <br> <div class="blockcode"> <div id="code_jHP"><ol> <li><img alt="" src="http://usr.im/200x60?bg=3498DB&text=tool.lu" class="img"></li> <li>结果为:http://usr.im/200x60?bg=3498DB&text=tool.lu</li> <li> </li> <li><img alt="" src="http://img.it-home.org/data/attachment/forum/2016pic2/55c877240001291602790279-80-80.jpg" class="img"></li> <li>结果为:http://img.it-home.org/data/attachment/forum/2016pic2/55c877240001291602790279-80-80.jpg</li> </ol></div> <em onclick="copycode($('code_jHP'));">复制代码</em> </div> <br> </td></tr></table> <div class="ptg mbm mtn"> 图为, 第一张, PHP</div> <div id="comment_66335" class="cm"> </div> <div id="post_rate_div_66335"></div> <br><br>