0

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
13
Views
5 Years
Discussion Span
Last Post by pritaeas
0

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

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

?>
0

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

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.