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 trialRonaldo Fialho
5,105 PointsSymfony HTTP_NOT_FOUND
<?php require DIR . '/vendor/autoload.php';
$response = \Symfony\Component\HttpFoundation\Response::Create( null, \Symfony\Component\HttpFoundation\Response::HTTP_NOT_FOUND, ['Location' => "/not_found.php"]); $response->send(); exit;
What's wrong here??? I am being redirected to not found page!
<?php
require __DIR__ . '/vendor/autoload.php';
$response = \Symfony\Component\HttpFoundation\Response::Create(
null, \Symfony\Component\HttpFoundation\Response::HTTP_NOT_FOUND, ['Location' => "/not_found.php"]);
$response->send();
exit;
2 Answers
Simon Coates
28,694 PointsIt likes "create" not "Create". ( for future users. I assume Ronaldo isn't still staring at this code on a screen with a growing sense of despair)
Ronaldo Fialho
5,105 PointsOk, I'll check it out! Thx Stephen for your time!!
Stephen Limmex
32,604 PointsStephen Limmex
32,604 PointsRonaldo,
I have not yet studied that course thus I am not sure of your answer but will try to help as you asked me to answer the question. I did find the following stackoverflow link which you may find helpful:
http://stackoverflow.com/documentation/composer-php/5915/auto-loading-with-composer#t=20170327164506092019
Good luck, Stephen