/ Published in: PHP
The .jpg extension can be changed to any extension. So if you want to pull out only .txt files, you just need to replace the .jpg with .txt. If you want to list ALL files, just remove the condition.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//path to directory to scan $directory = "../images/team/harry/"; //get all image files with a .jpg extension. //print each file name foreach($images as $image) { echo $image; }