设为首页 - 加入收藏 ASP站长网(Aspzz.Cn)- 科技、建站、经验、云计算、5G、大数据,站长网!
热搜: 创业者 手机 数据
当前位置: 首页 > 站长学院 > PHP教程 > 正文

PHP发表文章时自动保存图片例子代码

发布时间:2022-07-07 13:40 所属栏目:121 来源:互联网
导读:img_array = array(); content1 = stripslashes(content1); if (get_magic_quotes_gpc()) content1 = stripslashes(content1); //echo content1; filepath = ../uploadfile/.date(Y,filetime)./.date(m,filetime)./; !is_dir(filepath) ? mkdirs(filepath) :
  img_array = array();
 
  content1 = stripslashes(content1);
 
  if (get_magic_quotes_gpc()) content1 = stripslashes(content1);
 
  //echo content1;
 
  filepath = "../uploadfile/".date("Y",filetime)."/".date("m",filetime)."/";
 
  !is_dir(filepath) ? mkdirs(filepath) : null;
 
  filename = date("YmdHis",filetime).random(1).'.'.substr(value,-3,3);
 
  fp = @fopen(filepath.filename,"w");
 
  @fwrite(fp,get_file);
 
  fclose(fp);
 
  content1 = preg_replace("/".addcslashes(value,"/")."/isU", "/uploadfile/".date("Y",f。
 

(编辑:ASP站长网)

    网友评论
    推荐文章
      热点阅读