/    Sign up×
Community /Pin to ProfileBookmark

Need to build a linux home directory browser…plz help

Dear All,

My requirements are

1) to be able to login from web page as one of the existing linux users. This part i have completed already.

2) Then logged in user should be able to browse the home directory recursively and able to select a file and grab the filepath into a textbox.

scenario:

on server A:=> i have two files in my document root viz., index.html and browse.php

index.html
———-

<html>
<head>
<title>File Browser</title>
</head>
<body>
<form action=”browse.php” method=”post”>
<input type=”textbox” name=”filename” id=”filename” />
<br />
<input type=”submit” value=”browse” />
</form>
</body>
</html>


——————————–

Now my requirement is that when i click the browse button, in a new fixed size window all files should be appear with option “select file” and “cancel” button. So that I can browse any file and select it.

Similar to html file tag but my browse button should open the home directory of the server(i.e. /home/username)

I need a quick response. So Please please help me out. ?

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@eval_BadCode_Aug 14.2012 — php.net/manual/en/class.recursivedirectoryiterator.php

it honestly sounds like something you would use ssh + rbash with access to cat and ls for. Just thinking
×

Success!

Help @Prabir spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...