$map4 = "../../modules/sponsors/sponsors4/"; $map3 = "../../modules/sponsors/sponsors3/"; $map2 = "../../modules/sponsors/sponsors2/"; $map1 = "../../modules/sponsors/sponsors1/";$bestanden4 = scandir($map4);$bestanden3 = scandir($map3);$bestanden2 = scandir($map2);$bestanden1 = scandir($map1);echo "<div style=\"text-align: center;\">";foreach ($bestanden4 as $foto){ echo 'test'; if (substr($foto, -4)=='.jpg'|| substr($foto, -5)=='.jpeg' || substr($foto, -4)=='.JPG' || substr($foto, -4)=='.png'){ $info = pathinfo($foto); $filename = basename($foto,'.'.$info['extension']); if (file_exists("$map4/$filename.txt")){ $file = fopen("$map4/$filename.txt","r"); $website = fgets($file); echo "\n <a href='$website' target='_blank'><img src=\"$map4/$foto\" alt=\"\" style=\"width: 220px; margin: 20px;\"/></a>"; fclose($file); } else{ echo "\n <img src=\"$map4/$foto\" alt=\"\" style=\"width: 220px; margin: 20px;\"/>"; } }}foreach ($bestanden3 as $foto){ if (substr($foto, -4)=='.jpg'|| substr($foto, -5)=='.jpeg' || substr($foto, -4)=='.JPG' || substr($foto, -4)=='.png'){ $info = pathinfo($foto); $filename = basename($foto,'.'.$info['extension']); if (file_exists("$map3/$filename.txt")){ $file = fopen("$map3/$filename.txt","r"); $website = fgets($file); echo "\n <a href='$website' target='_blank'><img src=\"$map3/$foto\" alt=\"\" style=\"width: 220px; margin: 20px;\"/></a>"; fclose($file); } else{ echo "\n <img src=\"$map3/$foto\" alt=\"\" style=\"width: 220px; margin: 20px;\"/>"; } }}foreach ($bestanden2 as $foto){ if (substr($foto, -4)=='.jpg'|| substr($foto, -5)=='.jpeg' || substr($foto, -4)=='.JPG' || substr($foto, -4)=='.png'){ $info = pathinfo($foto); $filename = basename($foto,'.'.$info['extension']); if (file_exists("$map2/$filename.txt")){ $file = fopen("$map2/$filename.txt","r"); $website = fgets($file); echo "\n <a href='$website' target='_blank'><img src=\"$map2/$foto\" alt=\"\" style=\"width: 220px; margin: 20px;\"/></a>"; fclose($file); } else{ echo "\n <img src=\"$map2/$foto\" alt=\"\" style=\"width: 220px; margin: 20px;\"/>"; } }} foreach ($bestanden1 as $foto){ if (substr($foto, -4)=='.jpg'|| substr($foto, -5)=='.jpeg' || substr($foto, -4)=='.JPG' || substr($foto, -4)=='.png'){ $info = pathinfo($foto); $filename = basename($foto,'.'.$info['extension']); if (file_exists("$map1/$filename.txt")){ $file = fopen("$map1/$filename.txt","r"); $website = fgets($file); echo "\n <a href='$website' target='_blank'><img src=\"$map1/$foto\" alt=\"\" style=\"width: 220px; margin: 20px;\"/></a>"; fclose($file); } else{ echo "\n <img src=\"$map1/$foto\" alt=\"\" style=\"width: 220px; margin: 20px;\"/>"; } }}echo "</div>";
scandir(........./modules/sponsors/sponsors4/): Failed to open directory: not implemented"
$bestanden4 = scandir(WB_PATH.$map4);$bestanden3 = scandir(WB_PATH.$map3);$bestanden2 = scandir(WB_PATH.$map2);$bestanden1 = scandir(WB_PATH.$map1);
$map4 = "/modules/sponsors/sponsors4/"; $map3 = "/modules/sponsors/sponsors3/"; $map2 = "/modules/sponsors/sponsors2/"; $map1 = "/modules/sponsors/sponsors1/";
foreach ($bestanden4 as $foto){ if (substr($foto, -4)=='.jpg'|| substr($foto, -5)=='.jpeg' || substr($foto, -4)=='.JPG' || substr($foto, -4)=='.png'){ $info = pathinfo($foto); $filename = basename($foto,'.'.$info['extension']); if (file_exists(WB_PATH.$map4."$filename.txt")){ $file = @fopen(WB_PATH.$map4."$filename.txt","r"); $website = fgets($file); echo "\n <a href='$website' target='_blank'><img src=\"$map4/$foto\" alt=\"\" style=\"width: 220px; margin: 20px;\"/></a>"; fclose($file); } else{ echo "\n <img src=\"$map4/$foto\" alt=\"\" style=\"width: 220px; margin: 20px;\"/>"; } }}
[…] I didn't know exactly how to use the WB variables in the code module.[…]