你把$row["tupian"]打印出来看是什么东西。如果是文件名字,那你直接用unlink("文件名")试下;

解决方案 »

  1.   

    $id=$_REQUEST["id"];$sql="select tupian from chanpin where id=$id";$rs=mysql_query($sql);$row=mysql_fetch_array($rs);
    $tu=$row["tupian"];
    echo $row["tupian"];
    打印不出东西呢怎么,
    sql语句可以打印id也传进去了怎么打不出$row["tupian"]的值??
      

  2.   

    修改为mysql_query("select * from chanpin where id='{$id}'");看看1、你打印出$row["tupian"]是否有值
    2、你看$row["tupian"]的路径是否正确
    3、检查$row["tupian"]你是否有权限,尝试在在unlink前chmod
      

  3.   

    $sql="select tupian from chanpin where id='$id'"; 
      

  4.   

    id是整型的
    id可以传进去。
      

  5.   

    1。确定id值存在。
    2。确定sql无误,并存在数据
    3。确定目录权限和路径,你的情况可能是这个情况。
      

  6.   

    "select * from chanpin where id=$id"
    变量写在引号里能负上去么?
    我都是写成"select * from chanpin where id=".$id捏