Skip to content
Advertisement

listing files in folder showing index.php

I have this code, but it is showing the index.php itself How can I filter *.php files?

JavaScript

Also is there a way to sort them by modification or creation time?

Advertisement

Answer

Here’s another that uses ksort or krsort functions (tested).
(See comments in code.)

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement