回 帖 发 新 帖 刷新版面

主题:新手上路,问题sos(文件上传)

请各位大虾看看小生的代码错在哪里了?
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>

<body>

<form enctype="multipart/form_data" method="POST" action="unload.php" name="form1" onsubmit="unload.php">
  <!--webbot bot="SaveResults"
  U-File="D:\usr\www\html\_private\form_results.txt" S-Format="TEXT/CSV"
  S-Label-Fields="TRUE" -->
  <p><input type="file" name="t1" size="20">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <input type="submit" value="unload" name="B1"><input type="reset" value="全部重写" name="B2"></p>
</form>
<?
if(isset($B1))
{
if($t1!="none")
{
$v=opendir("\\temp);
if($v==0)
{mkdir("\\temp");
$v=opendir("\\temp");
}
$up=copy($t1,"\\temp\\$myfile_name");
if($up==1)
{echo "you are successful";}
else
{
echo "nothing you are put on";
}
unlink($t1);
closedir($v);
}
esle
{
echo "nothing you are put on" ;
}
}
?>
</body>

</html>

回复列表 (共1个回复)

沙发

我也是刚学PHP的,还看不懂你的脚本,呵呵
能一起学习PHP吗,
我的QQ是:512555548
[em9]

我来回复

您尚未登录,请登录后再回复。点此登录或注册