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 trialSteve Jones
Java Web Development Techdegree Student 78 PointsPath is not valid for PHP include function file?
While I am trying to include php file but the path is showing invalid
<?php include "admin/functions.php"; ?>
Folder is admin and inside admin, there is the functions.php file
It shows me this error
Warning: include(admin/functions.php): failed to open stream: No such file or directory.
Where am I doing wrong?
1 Answer
Shaun Earley
20,412 PointsYou are missing a set of parentheses around your file path.
<?php include ("admin/function.php") ?>
Hope this helps
Shaun
Steve Jones
Java Web Development Techdegree Student 78 PointsSteve Jones
Java Web Development Techdegree Student 78 PointsBut in another file, it has accepted the same path without parentheses, how?