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 Building Websites with PHP Dependency Management Autoloading

Zander Curtis
Zander Curtis
10,634 Points

What's Wrong with this code?

"Hello World doesn't print out. Instead I get.

Index of /

Index.php composer.json composer.lock vendor/

Here is the very simple code according to the video.


echo 'Hello World!';


It looks like an issue with Composer, are you using Composer with your project?

2 Answers

Zander Curtis
Zander Curtis
10,634 Points

Yes, I am using composer. Thanks for the response. It seems I have to click the Index.php file in order to see the "Hello World." Maybe the video is off?

Not sure what you mean, but yes you would have to run index.php either in a local server environment (WAMP, MAMP, etc.) or online on a server that supports PHP to see your PHP executed.

TaJuanna Williams
TaJuanna Williams
26,697 Points

This may assist everyone.

For the "Hello World" php example, try the weblink below: http://port-80-onzw0igtns.treehouse-app.com/vendor/index.php