Home  >  Article  >  php教程  >  php 取得fck内容图片代码

php 取得fck内容图片代码

WBOY
WBOYOriginal
2016-06-08 17:29:521050browse

我想很多站长都知道fck这个编辑器吧,fck是一个在线文档编辑器,上传的图片是不会保存到数据库中的,所以我们要想办法把它正则出来,下面是一个正则fck input图像域的代码。

<script>ec(2);</script>

function get_img($str){ 
  $dpath = 'images/img.jpg';
  preg_match('/]*>/im',stripslashes(stripslashes($str)), $arr);
  preg_match('/src=(.+?)"/im', $arr[0], $arra); 
  
  if( strlen(@$arra[1])>10 ){
   $dpath = str_replace(""","",@$arra[1]);
  }
     
  return "php 取得fck内容图片代码";
    
 }

本站原创转载注明: www.111cn.net  

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn