Tag Archives: PHP Functions

PHP List Files in Directory Excluding Index

PHP List all files in a directory excluding the index file from the list.

Functions used are array_values, preg_grep, glob, foreach and basename.

Another option using str_replace and !empty

PHP Automatic Logout – Auto Logout

This PHP function automatically logs out a user after a specified amount of inactivity.

Usage: Add this PHP code to the top of your pages