funkymunky20079
New Member
- Messages
- 3
- Reaction score
- 0
- Points
- 0
Hi,
I'm trying to include a file using php using the document root ($DOCUMENT_ROOT) method and I'm receiving the following error:
Warning: include_once(/home/adam1234/public_html/resources/libraries/facebook/fbmain.php) [function.include-once]: failed to open stream: No such file or directory in /home/adam1234/public_html/index.php on line 3
Warning: include_once() [function.include]: Failed opening '/home/adam1234/public_html/resources/libraries/facebook/fbmain.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/adam1234/public_html/index.php on line 3
I have also tried using a preceding backslash [the php is: include_once('/resources/config.php') ] however this returns the following error:
Warning: require_once(/resources/config.php) [function.require-once]: failed to open stream: No such file or directory in /home/adam1234/public_html/index.php on line 2
Fatal error: require_once() [function.require]: Failed opening required '/resources/config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/adam1234/public_html/index.php on line 2
The only way I can seem to get includes to work is using relative paths which will prove impractical as I continue to develop the site to a large scale.
Is there anyway I get get root path includes to work? I tried looking in phpinfo() however it has been disabled.
Many thanks,
Adam Bedford
I'm trying to include a file using php using the document root ($DOCUMENT_ROOT) method and I'm receiving the following error:
Warning: include_once(/home/adam1234/public_html/resources/libraries/facebook/fbmain.php) [function.include-once]: failed to open stream: No such file or directory in /home/adam1234/public_html/index.php on line 3
Warning: include_once() [function.include]: Failed opening '/home/adam1234/public_html/resources/libraries/facebook/fbmain.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/adam1234/public_html/index.php on line 3
I have also tried using a preceding backslash [the php is: include_once('/resources/config.php') ] however this returns the following error:
Warning: require_once(/resources/config.php) [function.require-once]: failed to open stream: No such file or directory in /home/adam1234/public_html/index.php on line 2
Fatal error: require_once() [function.require]: Failed opening required '/resources/config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/adam1234/public_html/index.php on line 2
The only way I can seem to get includes to work is using relative paths which will prove impractical as I continue to develop the site to a large scale.
Is there anyway I get get root path includes to work? I tried looking in phpinfo() however it has been disabled.
Many thanks,
Adam Bedford