Skip to content
Advertisement

xampp is not showing .php files saved in htdocs folder

I am using windows 7 and just installed xampp server to “E:xampp” in my laptop to learn php. Now the problem is whenever I start xampp server by starting “xampp_start” in xampp folder and start Apache and MySQL from “xampp-control” and type localhost in my browser it automatically gets converted into “localhost/xampp/” and display a default page instead of displaying the .php file which I created in htdocs folder.
Another problem is when I created a folder in htdocs folder and saved a index.php and another .php file which was created by me, it is not showing that folder too.
I know this question has been asked before but I didn’t get any solution from there because I started xampp_start from xampp folder and Apache & MySQL from xampp-control. So please help. Thanks in advance.
This is the default picture which is being displayed:
enter image description here

Advertisement

Answer

Thing is if you create any .php file in htdocs folder, you have to run that file as “localhost/filename.php” but if you created any folder in htdocs, for example folder name is “work” then you have to type “localhost/work/” and then it will show file contained in that folder.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement