/    Sign up×
Community /Pin to ProfileBookmark

Calling remote file into a .php or cgi file.

I recently inquired about how to have HTML codes inserted into a webpage from a remote file. What I discovered, worked like a charm;

<!–#include file=”example.txt” –> or <!–#include virtual=” example.txt” –>

However, where this fell short was in calling the remote file into a ‘cgi-bin script’ or .php file. I tried researching a solution which lead me to using the following codes;

<?php include example.php’; ?> or <?php include example. txt; ?>

This was unsuccessful. Am I missing anything? Can anyone please offer some advice on what would be the easiest way to have my .php file recognize HTML codes from a remote file?

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@niconel_comJun 01.2007 — What do you mean with " This was unsuccessful"...do you get some kind of error or what?

Try [CODE]<?php include("example.php"); ?>[/CODE], make sure the php file is in place.
×

Success!

Help @noy2014 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.6,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

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