I have a project and there are several folders containing image files belonging to the gallery: I need to optimize this by getting all the images from a given directory and generating them in HTML.
Basically, the project receives the directory in a parameter of the URL, thus becoming: localhost/?g=diretorio1%2Fgaleria1%2F
.
In this case all the files in the directory 'directory1 / gallery1 /' will be filtered to accept only image files and soon the HTML code <a href=""><img src="diretorio1/galeria1/x" /></a>
will be generated. Where x = name and extent of each image file .
I do not have much of a PHP notion, preferably guide me through articles or detail the answer so I can understand.