FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


PHP directory issue





Dark-Tech
Ok im not sure whats causing this problem but its with is_file and is_dir ..... or something on the server im using idk what....

Code:
<?php
// Note that !== did not exist until 4.0.0-RC2
$pathreconstruct ="/home/mentfis8/public_html/anime";
$newpath = 'styles/Mentaleak/theme/';


   $pathpieces = explode("/", $newpath);
   
for ($q = 0; $q < sizeof($pathpieces); $q++)
   {
      echo $q . " ";
      $pathreconstruct = $pathreconstruct . "/" . $pathpieces[$q];
      echo $pathreconstruct . " ";
      var_dump(is_dir($pathreconstruct));
        echo    "<br/>";
      echo    "<br/>";
      
      if ($handle = opendir($pathreconstruct))
      {
         while (false !== ($file = readdir($handle)))
         {
             if ($file != "." && $file != "..")
              {
               if (!is_file($file))
               {
               echo realpath(dirname($file)) ."/" . $file. "<br/>";
               }
            }
         }
      }
      echo    "<br/>";
      
   }

?>


These are the results

http://mentaleak.com/anime/dir.php


anyone have an idea ?
Magicman
Your link gives a 404 error, so I have no idea what the results are. I can't tell you what your problem is if I can't see what error the code is causing.
Related topics
PHP: Directory listing code
Server
Trouble using PHP5 with mysql
PHP and relative/absolute paths
php upload issue
php mkdir issue
Which is the best PHP Directory Script?
Question about a Fill out form.
How many files are in a directory?
lets Exchange links
question
A directory of PHP tutorials, applications, scripts!!!
Directory lister
PHP Sessions Issue
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.