javascript - Creating an 'index' of current files in a given folder? -


i want create webpage looks this:

<h1>index of results</h1>  <div class="results">     <ul>         <li><a href='result1.html'>--result 1--</a></li>         <li><a href='result2.html'>--result 2--</a></li>         <li><a href='... </a></li>     </ul> </div> 

where results updated on page every time there new file added folder/directory.

is possible monitor folder/ directory using javascript , update list without having hard-code links & tags etc?

heres php solution:

<?php print_r(scandir("/folder")); ?> 

you apply own html it:

<?php $files=scandir("/folder"); foreach($files $file){ echo "<p>". $file."</p>"; } ?> 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -