PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Vegan
Forum Regular
Posts: 574 Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:
Post
by Vegan » Tue Jul 16, 2013 12:21 pm
Code: Select all
include $_SERVER["DOCUMENT_ROOT"] . "/fb/facebook.php";
require_once("facebook.php");
how can I deal with the document_root relative include vs the require_once
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
requinix
Spammer :|
Posts: 6617 Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA
Post
by requinix » Tue Jul 16, 2013 12:40 pm
Both include and require_once just want file paths. They don't care how you construct it.
Code: Select all
require_once $_SERVER["DOCUMENT_ROOT"] . "/fb/facebook.php";
Vegan
Forum Regular
Posts: 574 Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:
Post
by Vegan » Tue Jul 16, 2013 4:18 pm
thanks
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP