We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,248 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

i want a code of display desk top folder contents on gui

actually my code is displyed var/www/html / folder contents only displayed on gui,
i want to display the /home/Desktop folder contents on gui,,,.......
plz any one help me.......

4
Contributors
12
Replies
2 Days
Discussion Span
11 Months Ago
Last Updated
13
Views
naaniwifi123
Newbie Poster
5 posts since May 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

What GUI are you talking about? Please provide some additional details.

pritaeas
Posting Prodigy
Moderator
9,309 posts since Jul 2006
Reputation Points: 1,178
Solved Threads: 1,465
Skill Endorsements: 86

i displayed /var/www/html/ folder contents in mozilla firefox but i want to displayed /home/Desktop folder contents in the mozilla firefox ......................................plz help me................

naaniwifi123
Newbie Poster
5 posts since May 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

How did you display the folder's content ?

pritaeas
Posting Prodigy
Moderator
9,309 posts since Jul 2006
Reputation Points: 1,178
Solved Threads: 1,465
Skill Endorsements: 86
<?php

$path = "/var/www/html/songs/";
here is the above path folder contents are displayed.........

but....

//$path = "/home/Desktop/songs/";
 i want to display this path folder contents in browser......
$dir_handle = @opendir($path) or die("Unable to open folder($path)");
echo "<table>";
while (false !== ($file = readdir($dir_handle))) {

if($file != '.' && $file != '..' && $file != 'Thumbs.db')
{
echo"<tr>";
echo "<td><input type=CHECKBOX name=$file></td>";
echo "<td><img src='small/$file' alt='$file'></td>";
echo"<tr/>";
}
}
echo"</table>";
closedir($dir_handle);

?>
naaniwifi123
Newbie Poster
5 posts since May 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Does the user or group have permissions to access that folder?

pritaeas
Posting Prodigy
Moderator
9,309 posts since Jul 2006
Reputation Points: 1,178
Solved Threads: 1,465
Skill Endorsements: 86

ya!.............. i given fill permissions for that folder..........like this(chmod -R 777 foldername/dir name

naaniwifi123
Newbie Poster
5 posts since May 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Do you get an error message ?

pritaeas
Posting Prodigy
Moderator
9,309 posts since Jul 2006
Reputation Points: 1,178
Solved Threads: 1,465
Skill Endorsements: 86

message comes like this Unable to open folder(/home/Desktop/songs)

naaniwifi123
Newbie Poster
5 posts since May 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Then the rights are not set correctly. You may have to use chgrp or chown. Perhaps the Apache forum is better suited for this.

pritaeas
Posting Prodigy
Moderator
9,309 posts since Jul 2006
Reputation Points: 1,178
Solved Threads: 1,465
Skill Endorsements: 86

My be You need to have a root account.or change permission of the foleder

vasvigupt
Newbie Poster
9 posts since Dec 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

still i am not getting the o/p, how to i give permissions for that group using(chgrp,chown)

asdfasdfasdfas
Newbie Poster
1 post since Jun 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Perhaps the Apache forum is better suited for this.

pritaeas
Posting Prodigy
Moderator
9,309 posts since Jul 2006
Reputation Points: 1,178
Solved Threads: 1,465
Skill Endorsements: 86

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.3445 seconds using 2.73MB