I'm trying to use php opendir() to see/address files on additional drives on my server. ie localhost is running on drive d, can I use php to see files on drive e? Can it be done? I'm sorry if this is the wrong venue for this question.

    If you're just interested in enumerating files, [man]glob/man is often far easier to use. Otherwise, the answer to your question is most likely yes, it's certainly possible. Things that might not make this possible would be intentional restrictions such as open_basedir.

    What have you tried?

      I've tried to using '../../../e:/other_file.php'. localhost is running on drive 'd'. I've also tried opendir() but can't go outside drive 'd'.

        Have you tried "e:/other_file.php"? Your E drive isn't on your D drive so there's no point using "../" to get to it.

          I've tried to using '../../../e:/other_file.php'. localhost is running on drive 'd'. I've also tried opendir() but can't go outside drive 'd'.

            That does not work. I get this error.... "The address wasn't understood" in browser.

              That does not work. I get this error.... "The address wasn't understood" in browser.

                Considering that your browser has no idea what PHP is doing behind the scenes... sounds like you've got bigger problems. What's your PHP code look like?

                  Write a Reply...