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.......

Recommended Answers

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

Jump to Post

How did you display the folder's content ?

Jump to Post

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

Jump to Post

All 12 Replies

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

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................

How did you display the folder's content ?

<?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);

?>

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

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

Do you get an error message ?

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

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

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

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

Perhaps the Apache forum is better suited for this.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.