$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"]的值??
修改为mysql_query("select * from chanpin where id='{$id}'");看看1、你打印出$row["tupian"]是否有值 2、你看$row["tupian"]的路径是否正确 3、检查$row["tupian"]你是否有权限,尝试在在unlink前chmod
$tu=$row["tupian"];
echo $row["tupian"];
打印不出东西呢怎么,
sql语句可以打印id也传进去了怎么打不出$row["tupian"]的值??
2、你看$row["tupian"]的路径是否正确
3、检查$row["tupian"]你是否有权限,尝试在在unlink前chmod
id可以传进去。
2。确定sql无误,并存在数据
3。确定目录权限和路径,你的情况可能是这个情况。
变量写在引号里能负上去么?
我都是写成"select * from chanpin where id=".$id捏