/    Sign up×
Community /Pin to ProfileBookmark

Root file includes

Does this error appear because the includes folder is actually a system folder aswell and it doesn’t let you link to it using /includes?? I can link to it via ../includes, I jus want to know why this happens to satisfy my questioning mind. The error is below:

[code=php]
Warning: main(): open_basedir restriction in effect. File(/includes/footer.php) is not within the allowed path(s):
(/home/s/u/site/:/usr/local/lib/php/:/tmp) in /home/s/u/site/latest-news/news_template.php on line 92

Warning: main(/includes/footer.php): failed to open stream: Operation not permitted in /home/s/u/site/latest-news/news_template.php on line 92

Warning: main(): Failed opening ‘/includes/footer.php’ for inclusion (include_path=’.:/usr/local/lib/php/’) in /home/s/u/site/latest-news/news_template.php on line 92
[/code]

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@bokehJul 05.2006 — Try:[code=php]$footer = $_SERVER['DOCUMENT_ROOT'].'/../includes/footer.php';
require_once($footer);[/code]
×

Success!

Help @solidariti spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.15,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...