PHP interesse |
|
ik krijg de volgnde errors:
Warning: Invalid argument supplied for foreach() in c:\domains\filiaal1220.nl\wwwroot\g0dlike\dir.php on line 27
Warning: Invalid argument supplied for foreach() in c:\domains\filiaal1220.nl\wwwroot\g0dlike\dir.php on line 30
komt er niet uit, wie weet raad, bvd
<?php
//Config
$lang['link'] = "Download this file";
$lang['open'] = "Open this map";
if (empty ($_GET['m'])) {
$map = "";
} else {
$map = $_GET['m'];
}
$array['maps'] = array();
$array['files'] = array();
if ($open = opendir($map)) {
while (($data = readdir($open)) == TRUE) {
if ($data != "." && $data != "..") {
if (!explode(".", $data)) {
$array['maps'] = $data;
} else {
$array['files'] = $data;
}
}
}
closedir($open);
}
//The output
foreach ($array['maps'] as $maps) {
echo "<a href='dir.php?m=".$map."/".$maps."' title='".$lang['open']."'><b>".$map."</b></a><br>";
}
foreach ($array['files'] as $files) {
echo "<a href='".$map."/".$file."' title='".$lang['link']."'><b>".$files."</b></a><br>";
}
?>
<?php //Config $lang['link'] = "Download this file"; $lang['open'] = "Open this map"; if (empty ($_GET['m'])) { $map = ""; } else { $map = $_GET['m']; } $array['maps'] = array(); $array['files'] = array(); while (($data = readdir($open)) == TRUE) { if ($data != "." && $data != "..") { $array['maps'] = $data; } else { $array['files'] = $data; } } } } //The output foreach ($array['maps'] as $maps) { echo "<a href='dir.php?m=".$map."/".$maps."' title='".$lang['open']."'><b>".$map."</b></a><br>"; } foreach ($array['files'] as $files) { echo "<a href='".$map."/".$file."' title='".$lang['link']."'><b>".$files."</b></a><br>"; } ?>
|