PHP 文件上传脚本
PHP #文件上传 #上传 #文件2012-04-19 21:27
当新手练习用吧,呵呵。
<?php if ( isset( $_FILES['fupload'] ) ) { print "name: ". $_FILES['fupload']['name'] ." "; print "size: ". $_FILES['fupload']['size'] ." bytes "; print "temp name: ".$_FILES['fupload']['tmp_name'] ." "; print "type: ". $_FILES['fupload']['type'] ." "; print "error: ". $_FILES['fupload']['error'] ." "; if ( $_FILES['fupload']['type'] == "image/gif" ) { $source = $_FILES['fupload']['tmp_name']; $target = "upload/".$_FILES['fupload']['name']; move_uploaded_file( $source, $target );// or die ("Couldn't copy"); $size = getImageSize( $target ); $imgstr = ""; print $imgstr; } } ?>
相关文章
- PHP验证邮件地址函数 2012/04/19
- PHP防SQL注入漏洞过滤函数 2012/04/19
- php open_basedir用法 安全设置 2012/04/19
- PHP开发安全规则 2012/04/18
- PHP的可变变量名 2012/04/18
- php的闭合标签要不要写 2012/04/15
- PHP函数strrev()函数的用法 2012/04/15
- PHP 检测是否手机浏览器的函数 2012/04/15
- PHPExcel常用方法 2012/04/15
- PHP程序员使用MySQL常犯的错误 2012/04/15