<html>
<body>
<table width="100%">
<?php
$handle = opendir("docs");
while (false !== ($file = readdir($handle)))
{
if ($file != "." && $file != "..")
{
$fs = filesize($file);
echo "<tr><td>$file</td><td>$fs</td></tr>\n";
}
}
closedir($handle);
?>
</table>
</body>
</html>
Oke, dit is dus het scrippie. Wat ik ook doe, hij geeft de foutmelding:
Warning: stat failed for probeg (errno=2 - No such file or directory) in c:\blaat\test.php on line 10
Maar, als ik een . (punt) invul bij 'opendir', dan laat 'ie wel alles goed zien, zonder enige fout.
By the way, zoals je misschien is opgevallen draai ik dit scriptje onder Windows. Hmmz, ik zag net dat het onder Unix/Linux ook zo is... hmpf!
'k Heb al van alles geprobeerd voor de dir:
docs
docs/
./docs
./docs/
.docs (?? tja, moest wat proberen ??)
etc...
Iemand een oplossing??
<body>
<table width="100%">
<?php
$handle = opendir("docs");
while (false !== ($file = readdir($handle)))
{
if ($file != "." && $file != "..")
{
$fs = filesize($file);
echo "<tr><td>$file</td><td>$fs</td></tr>\n";
}
}
closedir($handle);
?>
</table>
</body>
</html>
Oke, dit is dus het scrippie. Wat ik ook doe, hij geeft de foutmelding:
Warning: stat failed for probeg (errno=2 - No such file or directory) in c:\blaat\test.php on line 10
Maar, als ik een . (punt) invul bij 'opendir', dan laat 'ie wel alles goed zien, zonder enige fout.
By the way, zoals je misschien is opgevallen draai ik dit scriptje onder Windows. Hmmz, ik zag net dat het onder Unix/Linux ook zo is... hmpf!
'k Heb al van alles geprobeerd voor de dir:
docs
docs/
./docs
./docs/
.docs (?? tja, moest wat proberen ??)
etc...
Iemand een oplossing??