470,849 Members | 1,092 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

Listing of directory

Hi,

I have a few different templates that I want to list so my clients can see
different styles that are available.
So I want to offer them a drop down menu listing all the styles.

But to make my life easier I usually put all the templates in one folder and
the name of the sub-folder is the name of the template.
Instead of updating a file every time would there be a way of listing all
the files in one directory, (../template), and all those files will have the
same format...

<?php
$path = ...
$name = ...
$client= ...
?>
etc..

So how can I list all the files in one directory? Would there be any
security issues?

Regards.

Sims
Jul 17 '05 #1
1 1868
Sims a écrit le 04/05/2004 :
So how can I list all the files in one directory? Would there be any
security issues?


Read the manual about function opendir() and look at the example. This
is just what you want.
See is_dir() to check for a directory.
http://www.php.net/opendir
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by Kim Jensen | last post: by
19 posts views Thread by SU News Server | last post: by
2 posts views Thread by Tom | last post: by
8 posts views Thread by gil | last post: by
2 posts views Thread by ngr | last post: by
8 posts views Thread by dougawells | last post: by
4 posts views Thread by techusky | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.