I write PHP code , but it does not work.I can not connect my localhost.I also download XAMP.Who can help? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I write PHP code , but it does not work.I can not connect my localhost.I also download XAMP.Who can help?

4th Jan 2022, 6:21 PM
Tree Lover
Tree Lover - avatar
11 Answers
+ 2
Did you put the PHP code in your htdocs? If you didn't it wouldn't work, move the PHP code file to your xampp htdocs and then start your xampp and go to your browser and search localhost/nameofyourphpfile. This will surely work if your PHP file I inside the xampp htdocs
6th Jan 2022, 2:41 PM
Paul Fruitful
Paul Fruitful - avatar
+ 1
4th Jan 2022, 7:57 PM
Mario Kampmeier
Mario Kampmeier - avatar
+ 1
Mario Kampmeier Thanks for help
4th Jan 2022, 7:58 PM
Tree Lover
Tree Lover - avatar
+ 1
Hello friend php learner! I know how torturing it is to set up a xampp local host! Trust me, I stayed 2 days trying to set it haha but this video basically resolved everything https://youtu.be/NG1SJGYYbTk You just have to change some numbers of apache and mySql, and then execute xampp as administrator
6th Jan 2022, 1:48 PM
Tony G
0
Anyone, if you link the code in the question, from code playground, using + button, and inform the errors
4th Jan 2022, 7:14 PM
Emerson Prado
Emerson Prado - avatar
0
Emerson Prado In my project I don't have any errors.I can't connect to my XAMP server.
4th Jan 2022, 7:30 PM
Tree Lover
Tree Lover - avatar
0
Well, there can be something wrong in the connector, the network, the server, the firewall, etc. Whoever can help will need info.
4th Jan 2022, 7:45 PM
Emerson Prado
Emerson Prado - avatar
0
Did you start the Apache service? Does it show another port, something like 8080? Then you need to add this to the address like http://localhost:8080/ This should show you the XAMPP default page.
4th Jan 2022, 7:51 PM
Mario Kampmeier
Mario Kampmeier - avatar
0
Mario Kampmeier Is it exactly work?
4th Jan 2022, 7:53 PM
Tree Lover
Tree Lover - avatar
0
Paul Fruitful I do everything but it still don't work.Thanks, I will try one more time.
6th Jan 2022, 3:16 PM
Tree Lover
Tree Lover - avatar
- 1
I write a Php code In Brackets, but when I run it , the program say that I must to write my localhost in alertbox. But after that program typed that my localhost is wrong.
4th Jan 2022, 7:51 PM
Tree Lover
Tree Lover - avatar