开发者

scan files in a directory using ajax/javascript

开发者 https://www.devze.com 2023-01-24 07:03 出处:网络
Im a beginner of javascript and ajax. and i would like to use ajax to popul开发者_开发技巧ate mytag withwhich are the

Im a beginner of javascript and ajax. and i would like to use ajax to popul开发者_开发技巧ate my tag with which are the content of a particular directory.

is there such opendir() fxn in ajax just like in php? Where do i start from here?


Since you use ajax to access PHP, you can start with a simple ajax request and return the scandir results.

A quick guide for beginners can be found in this question, which should start you on your way.


No, there is no way to list files in either a server or client directory. You can make a server wrapper script for this, but it may be better to approach it at a higher level (e.g. return a list of resources, while not exposing the implementation of a resource).

0

精彩评论

暂无评论...
验证码 换一张
取 消