I have uploaded the image into the folder and stored the path into the MySQL Database. The path has been stored and the image has been inserted into the folder successfully. But my problem is when i display the image from the path which is stored in db. It is not displaying. When i echo the image path, it displays the image path. I checked my browser settings, it's all ok. Here is my code. Please anybody help.
$up=move_uploaded_file($_FILES['profile']['tmp_name'],dirname($_SERVER['DOCUMENT_ROOT']).'/htdocs/upload/image/'.$name);
$path = dirname($_SERVER['DOCUMENT_ROOT']).'/htdocs/upload/image/';
$location = $path . $_FILES['profile']['name'];
$ins=mysqli_query($con, "INSERT into image (url) values ('$location')");
echo 'image uploaded and stored';
echo "$location"; //It displays D:/xampp/htdocs/upload/image/Chrysanthemum.jpg
echo '<img width="250" height="250" src= "'.$location.'"/>';//It doesn't display anything.