PHP文件上传

创新互联建站网站建设提供从项目策划、软件开发,软件安全维护、网站优化(SEO)、网站分析、效果评估等整套的建站服务,主营业务为成都做网站、网站建设,手机APP定制开发以传统方式定制建设网站,并提供域名空间备案等一条龙服务,秉承以专业、用心的态度为用户提供真诚的服务。创新互联建站深信只要达到每一位用户的要求,就会得到认可,从而选择与我们长期合作。这样,我们也可以走得更远!

$upload_path=$_SERVER['DOCUMENT_ROOT']."/zcd/";

$dest_file=$upload_path.basename($_FILES['myfile']['name']);

echo

$upload_path;

echo

"
";

echo

$dest_file;

if

(move_uploaded_file($_FILES['myfile']['tmp_name'], $dest_file)){

echo"already upload";

}

else

{

echo"err happens".$_FILES['myfile']['error'];

}

?>

 

========================================== 

DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<

html>

<

head>

<

meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<

title>Insert title here

head>

<

body>

"test.php" method="post" enctype="multipart/form-data">

file:"myfile" type="file">

"submit" value="tijiao">


网页标题:PHP文件上传
本文地址:http://azwzsj.com/article/joepge.html