Cfile extension in view

hi guys

I’m working today with a new extension Cfile, and i want to use it in the view like below


if (CFile::set($path')->exist){


<p><img src="<?php echo $path; ?>" height="100" width="100" />





<p><img src="/images/user/unknown-person.jpg'; ?>" height="100" width="100" />



I got this error

Property "CFile.exist" is not defined. 

i think i need to do the “if else” in a controller, but i don’t know how can someone help me.

thank you very much

You’re trying


without ‘s’ in the ‘exist’, the correct is ‘exists’

Happy coding.

yes awesome.

Thank you very much, that was stupid from my side.