0

I have a Simple file browser on my php, and everytime I enter Open index.php file in my localhost, the file appears, but when I upload them in my server, the file cannot be seen, I made all the file permissions to 777 and still no luck... I think i miss some codes.. could you guys help me.. please...

Here's the code that I was working on... I got this from Micro file Browser made by PHP Toys:

<?php

$path = "browse/videos/";

function showContent($path){

if (is_dir($path)) {

   if ($handle = opendir($path))
   {
      while (false !== ($file = readdir($handle)))
       {
           if ($file != "." && $file != "..")
           {
               $fName = $file;
               $file = $path.'/'.$file;
               if(is_file($file)) {
                   echo "<tr><td><img src='images/file2.gif' width='16' height='16' alt='file'/> <a href='".$file."'>".$fName."</a></td>"
                            ."<td align='right'>".date ('d-m-Y H:i:s', filemtime($file))."</td>"
                            ."<td align='right'>".filesize($file)." bytes</td></tr>";
               } elseif (is_dir($file)) {
                   print "<tr><td colspan='2'><img src='images/dir2.gif' width='16' height='16' alt='dir'/> <a href='".$_SERVER['PHP_SELF']."?path=$file'>$fName</a></td></tr>";
               }
           }
       }

       closedir($handle);
   }	

}

}



?>

This is the code from my <body> section:

<div id="mainbrowser">
				<div class="caption"></div>
				<div id="icon4">&nbsp;</div>
				<div id="result">
				<table width="100%">
				<?php showContent($path);?>
				</table>
				</div>
				</div>

Im just a beginner :) Thanks in advance!

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by drelix01
0

check that you're uploading to the right place. check that the files are actually there through your FTP client.

you don't show your upload script.

0

Thanks! I didn't know that Directories are case sensitive :) MUCH THANKS! this case is solved!

This question has already been answered. 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.