码迷,mamicode.com
首页 > Web开发 > 详细

PHP上传文件小例子

时间:2015-02-15 19:25:26      阅读:135      评论:0      收藏:0      [点我收藏+]

标签:php

<html>
<head>
</head>
<body>
<?php

echo $_FILES['hello']['error'];
echo "start".$_FILES['hello']['type'];
echo $_FILES['hello']['size'];
echo $_FILES['hello']['tmp_name']."end";

move_uploaded_file($_FILES['hello']['tmp_name'], "./windows.pdf");

echo "finish!!";
?>


<p><font color="red">hello</font></p>

<?php
	
	
?>

<form action="index.php" enctype="multipart/form-data" method="post">
<input type="file" name="hello"/>
<input type="submit" name="submit" value="submit"/>
</form>
</body>
</html>

PHP上传文件小例子

标签:php

原文地址:http://blog.csdn.net/hellochenlian/article/details/43836753

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!