Last active
October 11, 2022 21:21
-
-
Save runezero/03384c094b0fffb18323da7d268b0b70 to your computer and use it in GitHub Desktop.
[Serve images from site] Print the image links from a directory #tools
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$id = $_GET['id']; | |
$path = getcwd() .'/' . $id . "/"; | |
$files = scandir($path); | |
foreach($files as $key => $file){ | |
if($file == "." || $file == ".."|| $file == "original"){ | |
continue; | |
} | |
if($key != 2){ | |
echo ","; | |
} | |
echo "https://domain.nl/directory/" . $id . "/" . $file; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment