I am going over this tutorial at the moment and I am working locally. My gallery folder (images, gallery.php, thumbs) is not in the root directory, it is in images folder and my following code seems not to work:
<?php if (is_dir('./images/gallery/thumbs') == false) { mkdir('./images/gallery/thumbs', 0744); } $dir = './images/gallery/'; $images = glob($dir.'*.{jpg,jpeg,png,gif}', GLOB_BRACE); foreach ($images as $image) { if (file_exists("./images/gallery/thumbs/{$image}")) { echo "<a href=''><img src='images/gallery/thumbs/{$image}' alt='{$image}' /></a>"; } else { echo "<a href=''><img src='?img={$image}' alt='{$image}' /></a>"; } } ?>This script creates the thumbs folder, lists the filenames as an array successfully, but when I view one of the images as you do on 10:53 of the video, it shows this in the address bar:
http://localhost/resimler.php?img=./ima ... tel-03.jpgI guess I have a mistake in the second echo, but I don't know what.