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 trialBoris Voinov
305 PointsConsole does not show the result
Hi, i am running a simple script:
<?php
$z = "hello";
echo $z;
?>
but when i try to run it in console nothing happens. i receive just an empty output:
treehouse:~/workspace$ php 1.php
treehouse:~/workspace$
what is wrong?
4 Answers
Pawandeep ShopWired
Courses Plus Student 9,848 PointsHave you checked that you have saved the file before you are outputting from the console
Erik Robles
Courses Plus Student 10,635 PointsThis stumped me too until I saved. Thanks for the insight.
Boris Voinov
305 Pointsno. the teacher uses it in his lessons and it works fine in console.
David Choi
8,536 PointsAre you sure that is the name of the file? If it is, this might be a problem with Workspaces. If it doesn't work after you restart Workspaces, I would advise you to reach out to Treehouse Support.
Logan Jame
252 PointsI have the same issue.... no matter what i do, it doesn't show the result in the Console
Andrew Young
Courses Plus Student 639 PointsAndrew Young
Courses Plus Student 639 PointsI think echo function in PHP is showing the result on web browser