Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAsif Ahmed
8,980 PointsMy browser displays only the php code I've written. How do I open it through localhost?
I right click and open my file through chrome, but the original code is displayed.
3 Answers
Asif Ahmed
8,980 PointsAh yeah I guess I jumped the gun. He explained how to install the Apache software in the next video. Thanks guys!
Sahriar Rahman supto
Courses Plus Student 1,403 PointsYou need to install Apache web server in your PC to make workable your .php file. Have you installed Apache web server in your machine? i am not sure which OS you are using but if you are in windows then install wamp or xamp server on your PC. just Google it you will get the documentation and download link. If you have any question regarding this reply me.
chrisp
13,686 PointsYou might have to save your codes in a web server directory, where all the PHP, MYSQL, APACHE packages are installed.
Launch the web server and through your web browser access the localhost and whatever default ports are define. You should be able to view the results for your codes.
The url is usually => localhost or the via ip => 127.0.0.1
I don't know what you are running, but for mine it is called htdocs or www.