Re: File Class Option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



something like this maybe:

<select name="my_files'>
<?
$handle=opendir('.');
while (false !== ($file = readdir($handle))) {
	if ($file == "." || $file == ".." || $file == "cgi-bin" || $file ==  
"favicon.ico") continue;
	if (! strstr($file, ".php")) {
	echo "<option>$file</option>\r";
	}
}
closedir($handle);
?>
</select>

I include the lines to weed out this file itself, or any other php  
files, or the current or parent directories or a few other files/ 
directories. In other cases I check against an array of allowed file  
types, perhaps. In any case, the trick is to not give away any more  
of my directory structure than I really want to.

-m

On Dec 19, 2005, at 7:49 PM, Konstantinos Christodoulakis wrote:

> I want a PHPClass which can list the filenames of the files on a
> folder and use the array to a form option menu.



------------------------ Yahoo! Groups Sponsor --------------------~--> 
AIDS in India: A "lurking bomb." Click and help stop AIDS now.
http://us.click.yahoo.com/9QUssC/lzNLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~-> 

PHP Data object relational mapping generator - http://www.meta-language.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux