/    Sign up×
Community /Pin to ProfileBookmark

Include path apparently doesn’t work

I’ve uncommented the following in php.ini on my Windows system:

include_path = “.;c:phpincludes”

Then restarted Apache. Inserting a file test.php into c:phpincludes, then using include(test.php) results in:

Warning: include(testphp) [function.include]: failed to open stream: No such file or directory in C:WebSitestestinclude_test.php on line 1

Warning: include() [function.include]: Failed opening ‘testphp’ for inclusion (include_path=’.;c:phpincludes’) in C:WebSitestestinclude_test.php on line 1

include(test.php) is the EXACT text of my function call. What is going on here?

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@bokehApr 20.2007 — Try:
[code=php]echo ini_get('include_path');[/code]
Copy linkTweet thisAlerts:
@tarsusauthorApr 20.2007 — Returns:

.;c:phpincludes


A fact that may or may not be relevant: When I created the file test.php in the includes directory, I had to create c:phpincludes. That directory did not already exist. Should there have already been an includes directory in php?
×

Success!

Help @tarsus 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 6.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...