I'm trying to make profile photos show up against a list of reviews on a site I'm working on. If they don't have a profile photo I have a standard image to show instead, unfortunately the image always goes to the standard image rather than the profile even if it exists. Heres the code:
$reviewerPic = 'http://www.[URL].co.uk/images/members/' . $reviewPosterId . '/profilePic.jpg';
$default_pic = 'http://www.[URL].co.uk/images/background.jpg';
if(file_exists($reviewerPic)){
$reviewer_pic = '<img src="' . $reviewerPic . '" width="100px" style="float: left; margin: 20px;" />';
}else {
$reviewer_pic = '<img src="' . $default_pic . '" width="100px" style="float: left; margin: 20px;" />';
}
Pretty generic code but it doesn't seem to work! It just keeps showing the background image...
Any ideas on why file_exists wouldn't be working?