Folder list php -


I want to list folder names in the list. There is a file to show the folder name. There is already a problem, please do a test. Another code would be OK.

& lt ;? Php function getFileList ($ folder name, $ fileType = "") {if (substr ($ folderName, strlen ($ folderName) - 1)! = "/") {$ Folder name. = '/'; } Foreach (Globe ($ folderName. '*'. $ FileType) $ filename) {if_dir ($ filename)) {$ type = 'folder'; } And {$ type = 'file'; } Echo str_replace ($ folderName, '', $ filename. '
'); }} // call function getFileList ('folder name'); // List of all files? & Gt; & Lt; Select class = "form" name = "userlevel" size = "1" & gt; & Lt; Option value = "& lt ;? php getFileList ('theme') ;? & gt;" & Gt; فولدر 1 & lt; / Options & gt; & Lt; Option value = "& lt ;? php getFileList ('theme') ;? & gt;" & Gt; فولدر 2 & lt; / Options & gt; & Lt; Option value = "& lt ;? php getFileList ('themes') ;? & gt;" & Gt; فولدر 3 & lt; / Options & gt; & Lt; / Select & gt;

No File Folder


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -