Re: [PHP] list files in a dictory and its subdirectories

2003-02-03 Thread Jason Sheets
An easy way would be to to convert your code to a function and use recursion with an is_dir conditional. Here is a quick example, there are also a few examples in the user notes at the PHP manual for opendir or readdir. function lsdir($dir) { if ($handle = opendir($dir)) {

[PHP] list files in a dictory and its subdirectories

2003-02-03 Thread Tomas Vorobjov
hey! this is the code I'm using to get into array all filenames in a directory: $mydir = mydir //the directory name $output_file = fopen($data_file, "w"); $begin = ""); fclose($output_file); chmod($output_file, 0777); //to preview