code:
<?php $filename = FCPATH.'resources/img/college_logo/'.trim($fetch['college_name']).'.jpg'; if (file_exists($filename)) { ?> <img src="<?php echo $filename; ?>"> <?php } else { ?> <img src="<?php echo base_url(); ?>resources/img/college_logo/logo_not.jpg"> <?php } ?> I am new in codeigniter and I want to display image if it exists else display logo not found image but now it only display logo not found. while I echo $filename it show me image path when I put path in url then it show me image but here its not working for me. So, How can I fix this issue ? please help.
Thank You

$filenameis an absoluteHTTPURL?URL's withfile_existsyou need to enable allow-url-fopen