/**
 * 提取字符串中图片url地址
 * @param type $str
 * @return type
 */
function getimgs($str) {
    $reg = '/((http|https):\/\/)+(\w+\.)+(\w+)[\w\/\.\-]*(jpg|gif|png)/';
    $matches = array();
    preg_match_all($reg, $str, $matches);
    foreach ($matches[0] as $value) {
        $data[] = get_file($value);
    }
    return $data;
}

  

相关文章:

  • 2021-09-26
  • 2021-08-30
  • 2021-09-04
  • 2022-12-23
  • 2021-11-16
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案