Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

In Apache httpd.conf file I can set the DocumentRoot value. After setting this, if I view "localhost" in a browser, I can see the folders and files this given folder contains. I cannot "speak" PHP language well yet but I assume that all PHP activities in connection with files and folders are limited to the scope of localhost, so if I handle files with PHP they must be in the folder set as DocumentRoot (or in subfolders of it).

How can I set localhost's scope to a wider range, especially to other drives? My goal is to be able to handle files with PHP on my whole computer (it's a "locahost-only" project so it's not a must to be able to use it on "real" servers).

share|improve this question

1 Answer 1

up vote 0 down vote accepted

PHP can access any files any where within your computer if you give it the right access permission. You can use absolute paths when locating a file in PHP.

share|improve this answer
    
Thank you! What if I don't know the name of files/folders - I have found the answer here how to get the hierarchy of a directory in PHP: stackoverflow.com/questions/660644/…. But I want to scan not just a directory but my whole computer. So the question is that how can I read in the list of all partitions in PHP? –  user3022924 Dec 24 '13 at 21:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.