解决方案为匹配到文章中的地址,然后保存到对应字段中
代码如下
$con='
http://www.gaodaima.com/50243.htmlpreg_match_all匹配文章中的图片作为文_php
你好哈哈哈,哈哈哈
你好哈哈哈,哈哈哈
你好哈哈哈,哈哈哈
你好哈哈哈,哈哈哈你好哈哈哈,哈哈哈
你好哈哈哈,哈哈哈你好哈哈哈,哈哈哈
你好哈哈哈,哈哈哈
你好哈哈哈,哈哈哈esrfe123234124
';$pattern="//";
preg_match_all($pattern,$con,$match);
print_r($match);
preg_match_all('/php[1-6]/','php5sdfphp4sdflljkphp3sdlfjphp2',$out);
print_r($out);
?>
来自PHP100博客,http://zhanglong.php100.com/
欢迎大家阅读《preg_match_all匹配文章中的图片作为文_php》,跪求各位点评,若觉得好的话请收藏本文,by 搞代码
微信 赏一包辣条吧~
支付宝 赏一听可乐吧~