quecojones wrote in php 🤔curious

Directory listing...

OK, so my web host doesn't show directory listings like some others do (where you type in the URL of a subdirectory on a site and get a list of files with each filename being a link to the actual file for downloading). I like this fact, but there are a couple of directories where I do want it to happen. I've asked a couple of friends and they told me that I would have to create a PHP script that

  • gets a directory listing ($dirlst = shell_exec("ls -al"); maybe?)
  • hands the information to a Perl script
  • gets the HTML formatted directory listing from the Perl script
  • displays the output from the Perl script


Isn't there a way to do this all in PHP? I'm new to PHP and have even less experience with Perl... I don't want to have to get into Perl just yet so I want to try this with just PHP. Any ideas?