加入收藏 | 设为首页 | 会员中心 | 我要投稿 PHP编程网 - 黄冈站长网 (http://www.0713zz.com/)- 数据应用、建站、人体识别、智能机器人、语音技术!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

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

发布时间:2022-07-07 15:07:32 所属栏目:PHP教程 来源:互联网
导读: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。
 

(编辑:PHP编程网 - 黄冈站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读