PHP PHP Basics Getting to Know PHP Intro to Workspaces and PHP Code

Amber Readmond
Amber Readmond
5,350 Points

The PHP workspace isn't giving me a readout with my hello.php in the first video. I've checked the syntax over and over.

When I push enter to run my code, it just starts a new line in the console with no read out. I named the file hello.php and my syntax is all correct. Am I missing something? My code looks like this: <?php echo 'Hello World'; ?> Then in the console I type: php hello.php I hit return and nothing happens except a blank new console line with nothing at the start of it that's any different than the line above.

Ben Glazier
Ben Glazier
7,303 Points

Hey Amber

Are you still having this issue? There isn't anything wrong with the code and how you're executing the PHP script, from what you've written above.

<?php
echo 'Hello World';
?>

There could be an issue with your instance of Workspaces. I would look to close your current session, re-launch Workspaces and re-write your PHP script (as it's a short one). If this doesn't work it might be worth reaching out to the Treehouse Support Team (help@teamtreehouse.com) directly.

Hope this helps.

4 Answers

Jason Richard
Jason Richard
1,520 Points

Hey, I had the same problem. You have to click on File and then save the hello.php file before you can run it on the console. She dosen't mention this in the video.

Amber Readmond
Amber Readmond
5,350 Points

Oh my gosh THANK YOU! I'm on day 6 of waiting for a reply from teamtreehouse's help email. THIS. WORKED. I could see if I was just asking for help with a coding problem, but this wasn't on my end and I'm actually paying for this site lol. rant over :) Thank you!

samanthametcalfe2
samanthametcalfe2
5,820 Points

thank-you, she seems to skip over alot.

Jason Richard
Jason Richard
1,520 Points

Your welcome Amber, keep Coding!!

Zach Hope
Zach Hope
12,486 Points

Thank you same issue here , easily resolved!

I spent way too long on that! It would be nice if she mentioned it in the video!