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 Contact Form & Sending Email Named Routes

workspace not work !!!!!

to day i am programming PHP buy in half day work space didn t work. all what i am coding is still not work. in chrome i have empty code!!! what's happening ???

Please go to the workspace you are having problems with. There is an icon on the upper right side that looks like a camera. Click that. A window will open to create a for snapshot. Open the snapshot and copy and paste the URL here. I can then look at what is in the Workspace.

4 Answers

There are several typical problems in general and some with PHP in particular.

General: save the workspace refresh the preview index.php has a problem. Remember it is case sensitive and should be all lower case. index.php is in the wrong folder. It should be outside of all folders you see in Workspaces.

PHP: Having no code is often because of an error in the code. Sometimes you get an error and sometimes you don't, depending on what the problem is.

do snapshot, there empty , but in workspace it all have https://w.trhou.se/y2xvioktc1

do snapshot, there empty , but in workspace it all have https://w.trhou.se/y2xvioktc1

maby problem in the server?

maby problem in the server?

I am making some progress. You had an error on line 24. You had new \Slim\Views\TwigExtentiong

It should be new \Slim\Views\TwigExtension(),

Now the preview shows errors, which is progress. I will post again if I find the additional errors.

In line 29 of your main.twig file I changed it to:

<?php
<a href="{{ baseUrl() }}" class="selected">About</a>

Now the picture of Emerson is broken, but I will let you try to figure that one out. Post back here is you need help on fixing that.

i am change it , but problem is not going out =(

i am change it , but problem is not going out =(

Let me see another snapshot please.

You did not fix this line:

$view->parserExtensions = array(
    new \Slim\Views\TwigExtentiong
);

As I said above, it needs to be

<?php

$view->parserExtensions = array(
    new \Slim\Views\TwigExtention(),
);

I don't know how experienced you are with programming, but you may want to take the PHP track PHP Development before you go too much farther with the Slim course. It assumes significant knowledge of PHP.

thanks maby you are right

thanks maby you are right