Jump to content
xisto Community
calvinlyp

Listing Of Files In Folder

Recommended Posts

Hi all,

Currently i am using 8.04 and 8.10 version of ubuntu.
with php mySQl and apache installed.

i am trying to create a website that will show the list of the files in my local disk (not the root folder of the apache).
eg of research i done shown below :
http://forums.xisto.com/no_longer_exists/
http://forums.xisto.com/no_longer_exists/
http://forums.xisto.com/no_longer_exists/
http://forums.xisto.com/no_longer_exists/

as i did serveral research and they normally show the listing of files from the root folder only.
please advise.
any help will be gratly appreciaed.

Share this post


Link to post
Share on other sites

If by "local disk" you mean the files on YOUR computer (not the server one) local disk, then I guess it's not possible with PHP, since PHP is a server-side scripting language. For doing that, I believe you should use some kind of java APP. Maybe PHP can be used, but getting the root directory and folders information, I guess you should use that other one I mentioned.

Share this post


Link to post
Share on other sites

If by "local disk" you mean the files on YOUR computer (not the server one) local disk, then I guess it's not possible with PHP, since PHP is a server-side scripting language. For doing that, I believe you should use some kind of java APP. Maybe PHP can be used, but getting the root directory and folders information, I guess you should use that other one I mentioned.

Hi Pankyy,
what i meant was that the computer is the server.
which mean is there ways to list the folders in the server itself not only the var/www folder(which is the root folder of apache).

thanks.

Share this post


Link to post
Share on other sites

If you have complete control of the server, then you most likely don't have to modify any system files. Therefore the following should work without any errors:

<?php$files = scandir("/");foreach ($files as $value)	echo $value."<br/>";?>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.