I tried the following code to check existence of file in root.
if($res['profile_picture']!="" && file_exists("images/".$res['users_id']."/thumnails/".$res['profile_picture'])){
$photo_p="images/".$res['users_id']."/thumnails/".$res['profile_picture'];
}
It works only on root directory not sub directory.
I'm not sure whether function file_exist checks for both absolute and relative paths so I tried adding ROOT and $_SERVER['DOCUMENT_ROOT']
. But still it didn't worked out.
Any Help?