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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.