I have a couple variables formated for use in ereg. I use them for other things in the script with eregi but I need to use them in file_exists. Ex:
$index_list = 'index|default';
$ext_list = 'php|html|htm';
// This is what I use those two for.
if (eregi("^(" . $index_list . ").(" . $ext_list . ")$",$item)) {
// ....
}
// But I need to use them in file_exists.
if (file_exists($dir . '/' . $index_list . $ext_list)) {
// ....
}
I think you can get what I'm trying to do. If not let me know and I'll try and explain it better.
Thanks