how can I open a php file in localhost with xampp? The folder is located at documents\foldername
I have started Apache and SQL in XAMPP.
If i type: http://localhost/foldername or http://localhost/foldername/index.php
i get 404
You can't access the files inside documents folder directly. Easy way is to place your files/folder inside C:/xampp/htdocs folder (Assuming C: is your windows drive).
So if you put your "foldername" folder inside xampp/htdocs, after that you can browse http://localhost/foldername or http://localhost/foldername/index.php .