1 2 3 4 5 6 7 8 9 10 11 12 13 |
//path to directory to scan $directory = "../"; //get all image files with a .jpg extension. $images = glob($directory . "*.jpg"); //print each file name foreach($images as $image) { echo $image; } |
![wordpress category](https://www.codehaven.co.uk/wp-content/uploads/2018/12/wp12-1.png)
1 2 3 4 5 6 7 8 9 10 11 12 13 |
//path to directory to scan $directory = "../"; //get all image files with a .jpg extension. $images = glob($directory . "*.jpg"); //print each file name foreach($images as $image) { echo $image; } |
© 2022 CODEHAVEN