Browsing Server Directory with 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 开发者_Go百科dynamic because the list will be changing a lot.
Thankyou!!!
Is it possible to use Javascript to list all the files contained in a subfolder?
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.
精彩评论