By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,064 Members | 1,445 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,064 IT Pros & Developers. It's quick & easy.

Listing of directory

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.