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 trialAndrew Hunt
7,665 Pointsre PHP not showing up
Hi,
I've just started on the PHP track and am trying to update my portfolio site to show 'last modified' details as per PHP basics. I added the following code into my index.html file, then renamed it to index.php
<p>Ā© Andy Hunt <?php echo $this_year; echo ' ' . $display_name; // outputs e.g. 'Last modified: March 04 1998 20:43:59.' echo ". Last modified: " . date ("F d Y H:i:s.", getlastmod()); ?></p>
When I then tried to reopen the file with Chrome it just showed up as a load of plain text. I don't really understand why this has happened, I wondered whether it was because I have PHP installed on my computer but I've checked and it does seem to be. Any advice would be welcome!
Thanks Andy