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

Preview Workspace for PHP comes up blank?

I just submitted this to Team Tree House and was told that I have to put it on the forum. Please can someone kindly help me?

The full index.php code from their exercise program produced a blank page, so I just shortened it to:

<html> <ul> <?php define(“MAX_BADGES”, 20); For($counter=3; $counter <= MAX_BADGES; $counter++) { echo “<li>” . $counter . “</li>”; } ?> </ul> </html>

However, this also produces a blank Preview Workspace?

The Preview Workspace Viewer is
http://port-80-q3hs66jxgp.treehouse-app.com/

I have also tried http://port-80-q3hs66jxgp.treehouse-app.com/index.php

best regards,

Ian.

Hi Ian,

Can you post a snapshot of your workspace? If you don't know how to do that, check out this forum post: http://www.teamtreehouse.com/forum/workspace-snapshots

This is a snapshot, please do say if I have not done it correctly?

https://w.trhou.se/ht2erwmsuk

Thank you for your kind help, I was not expecting such a quick response :-)

4 Answers

Hey Ian,

I found your problem. The code is put together correctly, but you had some special characters pasted in from some other editor or some page. Your double quotes weren't actually double quotes; they were special characters that look like double quotes. All I had to do was erase all of the double quotes that are currently in the code and replace them with " from keyboard input.

Here's the new snapshot: https://w.trhou.se/lwg44oa6r7

HI Marcus,

Thank you for your kind help and you are indeed right. I am very impressed at your speed response and am thank ful.

Please may I give some comments that may or may not be useful, please do feel free to forward them to your technical people.

I totally respect that these are things you probably already know and there are reasons you have not already done them. Please do not feel any need to respond, they are for your and the community's benefit.

1, When submitting a support request, if the answer is that users have to go to the forum, please say at that point, for example 'please all code questions, things not about a users membership subscription, go on the forum', or something like that?

Many people who care about privacy aka Google issues, Facebook issues, may not like to be forced to go on a public forum. I recommend allowing people in this case to use a screen name so they are not forced publicly onto the web. Some employers may also want this.......

2, It is well known that your tests cannot cope with all the derivatives of code formatting answers that are also correct.

know there are answers on the forum for this issue, but maybe have a cheat button to show the answer when this is the case.

I know this means it is not a proper exam, but the answers are on your forum anyway and this is just removing another annoying stage. As to me it appears the 'automated examiner' does not work, as much as this was probably envisioned as great feature, due to it's current faults, insisting on it's usage is probably the biggest harm to your brand. Maybe the cheat button could be removed once you know it can cope with all code format answers to the questions.

So these are mainly aimed at reducing stages and possible points of infuriation for some users.

Of course this is my view from now, after experience I may see why you have not done these things and of course I could be wrong,

best wishes,

Ian.

Maybe your system could detect if a character looks like it has been copied from another system and if that could cause any problems.

I know probably a small problem, something that other platforms do not detect, but over time maybe could affect a lot of users?

Again I totally respect if you believe otherwise :-)

Ian, I am merely a fellow student such as yourself; The treehouse staff are denoted on this site by green coloring around their picture and the word "Staff" below their name.

Hi Marcus,

              Sorry I had no idea, you really are a saint, thank you for your kindness.  

Can I ask you what the motivation is for students to be so kind on the site?

Please no need to reply, just a huge thanks for getting me out of the jam that I would never have worked out on my own,

best wishes,

Ian.

Hey Ian,

I've just always liked to help people personally, and I believe that knowledge is most powerful when shared. :) You're very welcome. Happy Coding!

Hi Marcus,

              Thank you for being awesome and opening me up into a wider world.  Please do contact me if there is anything I may be able to help with?

best wishes,

Ian