its a function .. delete : displayDirectory( 'portfolio','',false);
displayDirectory( directory name ,path to the directory, file types to list);
* the first argument is required, all other arguments are optional
* if the second argument is not provided it will look for director in the folder of the file when the function is actually coded; any path argument provided should also be relative to THAT file
* the third augment is an ARRAY or false. False will display all files in the directory, regardless of type. If you provide an array it will list only the file types in the array
for example, lets say you have a root directory, which contains two sub directories : "dirOne" and "dirTwo", the file with the code I provided is dirOne and you want a listing of JPGs, GIFs, and PNGs in dirTwo. What you would have to do , once you have included the file with my function is call it like this:
Try your test again, but this time do:
substituting 'theNameOfTheDirectoryThatHasIndexPHP' for the appropriate director name, of course.
include the rest in your code. BTW , if you use the include command , remember that the path given should be relative to the included, not the actual file. after your file is included all you need to do is call displayDirectory(); with the appropriate arguments anytime you want a directory listing.