Question: how to open file from htdocs?
Answer: Make sure your PHP files are saved as such; they must have the ". php" file extension. Open up any Web browser on your desktop and enter "localhost" into the address box. The browser will open a list of files stored under the "HTDocs" folder on your computer.