Note that there are some explanatory texts on larger screens.

plurals
  1. POhelp with PHP script to list directory needs to be recursive
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. COYou could use $dirname as $dirname = $_GET['dirname']; and $file_list as $file_list .= "<a href=\"?dirname=$webdirname/$file\">$file</a><br/>"; but this would bring you to a new level of problems such as people trying to send commands like "rm -rf *" to your $_GET and such so you would need to escape and sanitize all the incoming data so you don't run into problems but there is probably a better solution
      singulars
    2. COhmm, yea i would rather not use GET, i try to stay away from that for the most part... The problem is when I click on a directory, right now its linking to the direct path, and since it is a directory, not a file it goes to the apache directory. What I basically want to do is have it only actually point to a direct path if the item is a file (that way it can be downloaded) but if its a directory, I really just want to retrieve the files/directories inside of that and list them similarly to how I do now w/ my script....I'm honestly not the best w/ php so I'm having a bit of trouble
      singulars
    3. COJoe - there's no getting around using GET Unless you use POST - you have to update the script wit the new directory to traverse and display or you will continually get the Apache default directory because it's no longer pointed to the script but to the physical directory.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload