php 报错 求指教
报错内容:
Notice: Undefined index: value in D:\WWW\adduser.php on line 3
Notice: Trying to get property of non-object in D:\WWW\adduser.php on line 7
Notice: Trying to get property of non-object in D:\WWW\adduser.php on line 9
no
php代码:
<?php
$value = $_POST('value');
$obj=json_decode($value);
$id = $obj->id;
$inputfile = $obj->img;
$outputfile = "./qiubai/Userimg/".$obj->imgname . ".png";
$file = fopen( $outputfile, "w" );
$fwflag = fwrite( $file, base64_decode( $inputfile ) );
fclose($file);
if ($fwflag > 0) {
//把这条数据添加到图片数据库中去
$link = mysql_connect('localhost','root','root');
mysql_select_db('aaa',$link);
mysql_query('set names utf8');
$sql="UPDATE `quser` SET `UHEAD`= `".$obj->imgname."` WHERE `quser`.`userid`=".$id;
$res = mysql_query($sql);
printf("ok");
}else{
printf("no");
}
请问怎么解决??