/ Published in: PHP
URL: http://www.spoono.com/php/tutorials/tutorial.php?id=10
A simple script that lists all the items in the directory including folders and files and even makes a link out of them. Its an all purpose script which you can use to do other things.
Expand |
Embed | Plain Text
//define the path as relative $path = "/home/yoursite/public_html/whatever"; //using the opendir function echo "Directory Listing of $path<br/>"; //running the while loop { //encode spaces // convert the + (this is one result from the function rawurlencode) in %20 } //closing the directory
Comments
Subscribe to comments
You need to login to post a comment.

think not really secure u can access sys folder ? and u can use "urlencode" for encoding the url instead of "strreplace"