Search code examples
ajaxunobtrusive-javascript

scan files in a directory using ajax/javascript


Im a beginner of javascript and ajax. and i would like to use ajax to populate 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?


Solution

  • 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.