使用javascript浏览服务器目录 [英] Browsing Server Directory with javascript
本文介绍了使用javascript浏览服务器目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以使用Javascript列出子文件夹中包含的所有文件?
Is it possible to use Javascript to list all the files contained in a subfolder?
我有一堆图片需要链接,但我会喜欢它是动态的,因为列表会发生很大的变化。
I have a bunch of images that need to be linked too, but I would like it to be dynamic because the list will be changing a lot.
谢谢!!!
推荐答案
是否可以使用Javascript列出子文件夹中包含的所有文件?
Is it possible to use Javascript to list all the files contained in a subfolder?
没有。您通常会设置一个简单的服务器端脚本来执行列表(例如,使用PHP的 glob()
),并输出一个JSON数组,例如。
No. You would usually set up a simple server side script that does the listing (e.g. using PHP's glob()
), and output a JSON array, for example.
这篇关于使用javascript浏览服务器目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文