How To Overstep Away All Files Of Directory-Subdirectories Equally Dropdown Listing Using Codeigniter?

I bring a folders within a sentiment directory. Some of the folders contains files as well as around other contains around other subfolder alongside its file. What I desire is listing listing all the files of folders as well as subfolders within a sentiment directory.

I establish a the Directory Helper inwards Codeigniter. It contains functions that aid inwards working alongside directories. I used next role (recursive method) to practice a drop-down listing alongside files within a sentiment directory.
 <?php $this->load->helper('directory'); //load directory helper $dir = APPPATH. "views/your_folder/"; $map = directory_map($dir); echo "<select name='yourfiles'>"; 
role show_dir_files($in,$path) { foreach ($in equally $k => $v) { if (!is_array($v)) {?> <option><?php echo $path,$v ?></option> <?php } else { print_dir($v,$path.$k.DIRECTORY_SEPARATOR); } } } show_dir_files($map,''); // telephone phone the role echo "</select>"; ?>

Sumber http://developer-paradize.blogspot.com

Comments

Popular posts from this blog

What Are The Main Components of a Computer System

Top Qualities To Look For In An IT Support Team

How To Integrate Google Adwords Api Into Codeigniter?