PHP Logic

PHP Logic

by Patrick Malley -
Number of replies: 3
I'm trying to use file_exists to have Moodle check for a logo file in the theme folder. Unfortunately, it's not working. Here's what I have $filename= "$CFG->themewww/accentuate/images/logo.jpg"; if (file_exists($filename)) { I'm guessing that the problem is in the way I'm passing the $filename variable through file_exists. Any help is appreciated.
Average of ratings: -
In reply to Patrick Malley

Re: PHP Logic

by Deleted user -
$filename= "{$CFG->themewww}/accentuate/images/logo.jpg";


But properly you are trying to different things wrong also, file_exists does support URL wrappers, but properly you don't want to go through your webserv to see if a local file exists, do you?

hit helps if you tell us what you are trying to do.

Check how other extensions work, and if you need to check if a local file exists, then check it on your local filesystem and don't ask your webserver (unless you really know what you are doing in very special situations like replications).


Ries