放这么多CSS、HTML干嘛?眼都看晕了。。
只把PHP代码、出错现象贴出来就行了

解决方案 »

  1.   

    1、你查询一下服务所用的php版本。在4.2(?)以后的版本中,变量传递,尤其是文件上传,会有一些差别。
    2、请你给出错误提示。这样别人才能更准确更容易的定位你的错误。
      

  2.   

    取掉部分冗余的html,你的程序变成这样
    <form method=post>
    <br>文件:<input type=file name=filepath size=60 maxlength=50>
    <br>密码:<input type=password name=thepwd size=60 maxlength=12>
    </form>
    <?
    if($thepwd=="password"){
    echo "文件路径:".$filepath."<br>";
    if(file_exists($filepath)){
    $filesize=filesize($filepath);
    echo "文件大小:".$filesize." Byte &nbsp;&nbsp;&nbsp;&nbsp;";
    if($filesize>5000000){echo "<font color=#ff0000>文件太大,限制上传</font>";}
    else{
    for($i=1;$i<=20;$i++){
    $filename=substr($filepath, -$i+1, $i+1);
    if(substr(substr($filepath, -$i, $i),0,1)=="\\"){break;}
    }
    if(file_exists($filename)){echo "<font color=#ff0000>服务器上该文件已经存在</font>";}
    else{
    if(!copy($filepath,$filename)){echo "<br><font color=#ff0000>文件上载失败,请确定服务器连接</font>";}
    else{echo "<br><font color=#ff0000>文件上传成功,提醒定期检查空间大小</font>";}
    }
    }
    }
    else{echo "提交错误:该文件不存在";}
    }
    ?>
    删除文件
    <form method=post>
    <br>文件:<input type=text name=filename2 size=60 maxlength=50>
    <input type=Reset value=' 重 填 ' name='Reset'>
    <br>密码:<input type=password name=thepwd2 size=60 maxlength=12>
    <input type=submit value=' 提 交 ' name='submit'>
    </form>
    <?
    if($thepwd2=="password"){
    if(!file_exists($filename2)){echo "提示:服务器上该文件不存在";}
    else{
    if(!unlink($filename2)){echo "提示:服务器上文件存在,删除时发生未知错误";}
    else{echo "提示:删除文件成功";}
    }
    }
    ?>
    这个程序在本地也不可能正确执行,至少有以下错误:
    1、第一个表单(包含file对象)
    缺少enctype="multipart/form-data"属性
    缺少提交对象type=submit
    2、php部分的操作是按操作本地文件书写的,而不是按上传文件
      

  3.   

    777属性设置
    http://jueban.ku.net
    就是51的,上传删除都没问题,你可以进管理段看看
      

  4.   


    仍然报错,用上面的代码产生错误如下:文件路径:M:\\counter-striker\\uninstall.exe
    提交错误:该文件不存在