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 trialSamuel Sanders
6,992 Pointsmy code does not get a "Fatal_Error" it creates a new file datadddbase.db. Why does it not fail?
<?php
// remove before flight (or send to production) ini_set('display_errors', 'On');
try { $db = new PDO('sqlite:./datadddbase.db'); var_dump($db); die(); } catch(Exception $e) { echo 'Sorry the connection was not successful'; die(); }
Gyver Vick
5,347 PointsFYI, I seem to have found an answer in another part of the forums.
Samuel Sanders
6,992 PointsThanks Gyver Vick!!!
2 Answers
John Hill
Front End Web Development Techdegree Graduate 35,236 PointsNot sure why it's behaving this way, but the work around is to jumble up the 'sqlite:' part of the argument.
Jonathan Grieve
Treehouse Moderator 91,253 PointsAll the workaround does though is to create an error that the exception won't capture though so you'll get the standard php error. Best advice i can give for now is to follow the video along as closely as you can and if you get the list on the screen, that's the sign that the code is functional. :-)
Gyver Vick
5,347 PointsGyver Vick
5,347 PointsI'm having the same problem using the following code. Can anyone provide some insight?