I'm trying to make a form that has a select box in which displays all the images files I have in an specific folder.
(我正在尝试制作一个具有选择框的表单,其中显示我在特定文件夹中的所有图像文件。)
The idea is something like this:(这个想法是这样的:)
I have this folder /PATH/TO/FOLDER that contains 5 images (image1, image2, image3...).
(我的这个文件夹/ PATH / TO / FOLDER包含5张图像(image1,image2,image3 ...)。)
The form would be like the one down here but each option is one of the images inside the folder.(表单就像下面的表单一样,但是每个选项都是文件夹内的图像之一。)
<form action="SOMETHING HERE">
<select name="images">
<option value="">image1</option>
<option value="">image2</option>
...
<option value="">image5</option>
</select>
<br><br>
<input type="submit">
</form>
But instead of manually adding each option it has to be dinamicaly generated so that when i add new images to the folder it will update the select.
(但是,不是手动添加每个选项,而是必须动态生成,以便当我将新图像添加到文件夹时它将更新选择。)
ask by Beatriz Couto de Carvalho translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…