05-15-2008, 12:59 AM
[eluser]Sumon[/eluser]
I am surprised to found that file_exists() function is not working in CI Helper functions. Moreover, base_url() function works fine inside helper. It makes me confused. May be i am wrong or it's a restriction of CI.
here is my code:
Surprisingly it goes else block always.. i copy and paste the URL get by echo of my code and browser displays my image in there.
Any idea where i made mistake or file_exists() function not working inside Helper?
I am surprised to found that file_exists() function is not working in CI Helper functions. Moreover, base_url() function works fine inside helper. It makes me confused. May be i am wrong or it's a restriction of CI.
here is my code:
Code:
$ImgLoc=base_url()."gallery/member_picture/member_thumbnail/member_no_image_thumb.jpg";
echo $ImgLoc;
if(file_exists($ImgLoc))
return "File is in server";
else
return "Not in server";
Surprisingly it goes else block always.. i copy and paste the URL get by echo of my code and browser displays my image in there.
Any idea where i made mistake or file_exists() function not working inside Helper?