All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
AJAX技术在PHP开发中的简单应用_[AJAX教程]
C#根据条件搜索Infopath生成的XML数据_.net资料_编程技术
asp.net2.0生成一个复杂的验证码,背景随机,字体随机,中英文数字随机_[Asp.Net教程]
代码实例:在ASP.NET中上传图片并生成缩略图_.net资料_编程技术
将SSH与PHP相连接,确保传输数据的安全_php资料_编程技术
根据IP获取当地天气预报的实现_[Asp.Net教程]
PHP编写网站程序的十个经验技巧_php资料_编程技术
PHP和AJAX打造高级RSS聚合器_php资料_编程技术
C#提交数据到服务器并返回的处理_[Asp.Net教程]
百分百的弹出窗口_JavaScript技术_编程技术
Reading number is top 10 pictures
Extremely rare TianShan Mountains snow lotus1
So beauty, will let you spray blood4
XuRe xuan cool and refreshing photoes2
Beauty ZhiHuiLin1
Seductive beauty of crime2
西游四格漫画(一)
The real super beauty11
XuRe xuan cool and refreshing photoes1
Born After 90 Beijing sports university campus flower photos5
俞敏洪在清华终于说了实话
Download software ranking
VC++6.0简体中文版
WebService在.NET中的实战应用教学视频 → 第1集
Jinling thirteen stock
Rio big adventure
功夫熊猫2(上集)
Take off clothes to survival
Unix video tutorial17
XML+Web+Service开发教程
Sora aoi, the maid, students' uniforms
Red cliff
归海一刀 published in(发表于) 2014/2/10 6:48:42 Edit(编辑)
PHP实现发表文章时自动保存图片_[PHP教程]

PHP实现发表文章时自动保存图片_[PHP教程]

PHP实现发表文章时自动保存图片_[PHP教程]

img_array = array();
content1 = stripslashes(content1);
if (get_magic_quotes_gpc()) content1 = stripslashes(content1);
//echo content1;
preg_match_all("/(src│SRC)="(http://(.+).(gif│jpg│jpeg│bmp│png))/isU",content1,img_array);
img_array = array_unique(dhtmlspecialchars(img_array[2]));
set_time_limit(0);
foreach (img_array as key => value) {
get_file = file_get_contents(value);
filetime = time();
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",filetime)."/".date("m",filetime)."/".filename, content1);





添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.