Php Grep Sort files by date descinding order with date -


I want to sort files in descending order with a date to direct, and use only Grep

Define
  ("slash", strisor ($ _ server [SERVER_SOFTWARE], "win")? "\\": "/"); Function php_grep ($ path) {$ fp = opendir ($ path); While ($ f = readdir ($ fp)) {if (preg_match ("# ^ .. $ $", $ F)) continues; // Ignore symbolic links $ file_full_path = $ path.SLASH. $ F; If ($ file_full_path) {$ ret. = "$ File_full_path \ n"; }} $ Ret; } Echo "prefix"; Print_r (php_grep ("/ home"));  

You can do something like this:


Comments

Popular posts from this blog

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

class - Kivy: how to instantiate a dynamic classes in python -

python - mayavi mapping a discrete colorbar on a surface -