在mysql中上传时将图像重命名为用户名
$file=$_FILES['image']['tmp_name'];
$image= addslashes(file_get_contents($_FILES['image']['tmp_name']));
$image_name= addslashes($_FILES['image']['name']);
move_uploaded_file($_FILES["image"]["tmp_name"],"photos_user/" . $_FILES["image"]["name"]);
$location="photos_user/" . $_FILES["image"]["name"];
我的用户名是
$fname= $_POST['fname'];