I password protected the directory so each file has a “LCK” file. When i added that extension to the “$forbiddenExts” line but they still show up. If I add “pdf” to the code then the pdf files and the pdf.LCK file are hidden. I only want to hide the LCK file. Any ideas?
I did add “IndexIgnore *.LCK” to my .htaccess file but now that i am using this they show up again. please help!
From what I understand of your problem, yes, adding an extension (e.g., `LCK`) to the `$forbiddenExts` array will prevent files with those extensions from being added to the `$dirArray` array (provided there is exactly one `.` in the filename).
> I only want to hide the LCK file.
Meaning any file that ends in `.LCK`, correct? You don’t care about anything else?
// all files in $myDirectory not ending in “.LCK”
$dirArray = glob( $myDirectory.’/*.[!L][!C][!K]‘ );
Only thing you might need to change is to remove the `/` in the pattern if your var `$myDirectory` already ends with one.
I don’t understand the rest of what you wrote.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".