Hi guys, I wonder if anyone could help me with something?
I'm trying to write an if/else statement to echo one thing if a file is in a particular drectory, or to do somthing else if not.
does anyone know if there's a wildcard character to add to if/else conditions? For example, if you wanted to search your computer for all html files you'd search for ".html" or "folder_name/*" to find all files in a folder - can this be done in php?
here's the sort of thing i'm looking for - replacing the *s with whatever the wildcard might be...
<?
$self = $_SERVER[’PHP_SELF’] ;
if ($self == "*/folderA/*") {
echo "You are in folder A!" ;
} else {
echo "You are not in folder A!" ;
}
?>
Thanks for your help.