ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
can someone help me please? i need to make a php script to display a files on my server in browser.
i m trying a couple of days but i can't do this
let me bee more specific.
i need a form with text field and submit button, so i can enter some directory and when i click on submit button
on next page to display the contents of thet directory. for example when i enter /home in text field on next
page to see all files and folders in that directory.
i have a submit form like the one bellow:
<HTML>
<HEAD>
<TITLE>Display Directory Contents</TITLE>
</HEAD>
<BODY>
Also, you won't be able to list the contents of /root unless it's readable by the Web server process, which it shouldn't be. PHP scripts like this that allow access to system directories can be big security holes if you're not careful, as wrj alluded to.
ok ...thanks to all... here is the script so anyone can use it. but what i need now is this....how can i create a form with user name and password so i can login to my server and after my login to se the page with my files and folders. i know how to do this with user name and passwords stored previously in some mysql database, but i need to login with my root username and my root password. something for example when i enter root for username and my pass the script need to compare with the username and password in /etc/shadow and then if everything is ok to let me in...or something similar....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.