1. Why does this display a . and a … in addition to the files in the directory? - I don’t want this 2. Why don’t the links include the real file path? Hence the pictures won’t open…
Because you didn’t ask it to differentiate between files and directories. Each folder in linux contains a . and … for current folder and parent folder. You can use is_file($dir . ‘/’ . $filename) to get rid of them.
Because $filename is just the file name. You need to use $dir . ‘/’ . $filename to get the full path.
Thanks a lot, I did manage to get the link working properly, but I’m not familiar enough with PHP yet to do this kind of magic…
I was trying something along the lines of: