WordPress如何获取文章里面全部图片或者前几张图片
参考:function wpdit_get_post_images($post_content){preg_match_all('||i', do_shortcode($post_content), $matches);if($matches){ return $matches;//自行var_dump($matches)就可以看到效果了。
}else{return false;}}
获得网站图片地址
com/2009/05/alien_poster_small.jpghttp://theinspirationroom.flickr.com/2475/3732247103_626a35a6d3_o.net/fs16/f/2007/214/5/1/Aliens___The_Movie___by_redguard.jpghttp.net/fs36/f/2008/249/2/c/Aliens_tribute_by_IRIRIV.jpg" target="_blank">http://fc00.jpg" target="_blank">http.harshcg先给你几张。
不够再找.wordpress://www.icollector.com/images/1202/14989/14989_0938_1_lg.jpg" target="_blank">http://www.icollector.jpghttp://farm3.static.com/daily/print/2009/2/aliens_vs_predator_chess.com/wp-content/uploads/2009/05/aliens-vs-predator-20090525035340271.jpg" target="_blank">http.jpg" target="_blank">http.jpg好吧://seganeptune://fc07.deviantart://ps3thevolution.com/wp-content/uploads/2009/05/aliens-vs-predator-20090525035340271.jpghttp://i135.jpghttp://media.photobucket.com/image/aliens%20pictures/Dr_Neuro/Blog/batman_vs_aliens_croc-alien.jpg...
转载请注明出处51数据库 » wordpress 获取图片地址