/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Won’t "include" function work with absolute URLs?

Hi guys,

I have discovered in my code that though this line works:

[code=php]include(“server_info.php”);[/code]

this line does not:

[code=php]include(“http://www.thesiteguru.com/php/server_info.php”);[/code]

Any reason for this? Or could I be doing something wrong? I have verified that the second URL is indeed correct.

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@remaeisJul 27.2010 — php can not call file over URL, coz its server side....you should try like: /home/users/web/b768/moo....... you should know this path from your hosting server
Copy linkTweet thisAlerts:
@Mr__BagginsauthorJul 27.2010 — remaeis,

So [I]that's[/I] it. Thanks a lot for the information and your time!
Copy linkTweet thisAlerts:
@remaeisJul 27.2010 — n.p. - am not 100% sure, but i have some problems using url in PHP in script for upload, and with full path (that server can read)...it works fine ?
Copy linkTweet thisAlerts:
@remaeisJul 27.2010 — btw.... if you need traffic for your website, feel free to use my service:

http://tonaq.com

its free and works 100%
×

Success!

Help @Mr__Baggins 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 3.29,
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: @darkwebsites540,
tipped: article
amount: 10 SATS,

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

tipper: Anonymous,
tipped: article
amount: 10 SATS,
)...