myola2591412a wrote:I tried to open the test.php using "http://xampp/htdocs/test.php".
That can't work. You have to use the http protocol, there you are right. But you can't just put your full folder structure in there.
Your Webserver have a startdirectory where it starts to look for files on your computer. That folder is called DocumentRoot and is by default the htdocs folder.
The DocumentRoot Folder is automatically mapped to the computers IP. The Webserver listens on port 80 for requests.
localhost is an alias for the computers own Address.
So, if you type in your Browser http://localhost/
your Webserver automatically looks for files in c:\xampp\htdocs.
If you want to request the file test.php inside your htdocs folder the correct URL is http://localhost/test.php