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

Reading number is top 10 articles
脚本实例:用,javascript,来操作字符串_JavaScript技术_编程技术
asp.net2.0对DataList数据控件进行绑定
当ASP.NET撞上JSF之应用程序安全性_[Asp.Net教程]
重新计算自动编号_[SQL,Server教程]
ASP.NET Remoting体系结构(五)
如何在C#中播放AVI短片并使背景透明_[Asp.Net教程]
如何用在ASP.NET中写入事件日志_[Asp.Net教程]
通过序列化和反序列化泛型数据实体集合来实现持久化数据对象的方法_.net资料_编程技术
SQL Server 2005下的分页SQL_[SQL Server教程]
delphi函数SetSystemCursor自定义鼠标
Reading number is top 10 pictures
Absolutely shocked. National geographic 50 animal photographys3
Ashlynn Brooke a group sexy photo3
This is heaven to some path
Sora aoi possession of boudoir1
Li Zongrui hunting video screenshots2
Exquisite decoration is not paying too much1
美女和狗狗2
谁认识这位校花
猫眯也疯狂
教你做读书笔记
Download software ranking
中国结婚习俗实录
Unix video tutorial4
matrix1
Unix video tutorial3
C++编程教程第三版
Tram sex maniac 2 (H) rar bag8
Tram sex maniac 2 (H) rar bag5
SQL2000 For 4IN1
网页特效实例大全
Eclipse 4.2.2 For Win64
aaa published in(发表于) 2013/12/21 22:24:49 Edit(编辑)
PHP上传文件的代码_php资料_编程技术

PHP上传文件的代码_php资料_编程技术

PHP上传文件的代码_php资料_编程技术-你的首页-uuhomepage.com
动态网站开发中,常用的PHP上传文件的代码实例。




网页教学网(webjx.com)文件上传实例










function getname($exname){

$dir = "../uploadfile/";

$i=1;

if(!is_dir($dir)){

mkdir($dir,0777);

}


while(true){

if(!is_file($dir.$i.".".$exname)){

$name=$i.".".$exname;

break;

}

$i++;

}


return $dir.$name;

}


$exname=strtolower(substr($_FILES['upfile']['name'],(strrpos($_FILES['upfile']['name'],'.')+1)));

$uploadfile = getname($exname);


if (move_uploaded_file($_FILES['upfile']['tmp_name'], $uploadfile)) {

echo "

文件上传成功!


";

}else {

echo "

文件上传失败!


";

}

echo "下面是文件上传的一些信息:


原文件名:".$_FILES['upfile']['name'] .

"
类型:" .$_FILES['upfile']['type'] .

"
临时文件名:".$_FILES['upfile']['tmp_name'].

"
文件大小:".$_FILES['upfile']['size'] .

"
错误代码:".$_FILES['upfile']['error'];
?>




添加到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.