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 trial

PHP

Nicholas Phillips
Nicholas Phillips
811 Points

PHP tags not properly processing

Hey Everyone,

So, I am not very experienced with PHP, but I feel pretty comfortable with it thus far as I am working on the "Simple PHP Application" project. Everything makes perfect sense to me and I have been able to properly replicate all of the code from the first handful of project videos. The only problem is, when I try to open my code files in the browser, anything in a php tag doesn't properly load. Instead, the browser just renders a blank space where the php ought to be.

I have xampp installed and running properly, with both Apache and MySQL activated. I have Wordpress installed for a site I am building and everything there seems to function properly (it locates php, css, and screenshot files for custom themes and so forth just fine), so I feel confident that I installed xampp correctly. It is as though, when I open a php file, the browser is attempting to process any php tags like html instead of sending them to the server to be processed first. I have checked, double checked, and triple checked my code, so I know this isn't the issue. Have I missed a setting somewhere in xampp or something? Any help would be awesome! Thanks.

-Nic

1 Answer

Nicholas Phillips
Nicholas Phillips
811 Points

Never mind, I figured it out... I had to manually type in the file path beginning with "localhost". If anyone else has this issue, try that. Before, I was just right clicking on my php file and asking it to open in the browser, which did not work. Hope this saves someone else the same frustration I was having.