/    Sign up×
Community /Pin to ProfileBookmark

how to insert text from a remote location

Is it possible to display a text document from a remote location using HTML?

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@pcthugFeb 25.2006 — Using Server-side would be the most practicle solution, here are 2 of the most popular methods:

<!--#include file="path/to/file.txt" -->

<?php include('path/to/file.txt'); ?>

add either one of these two pieces of code to your HTML, and save with the correct extension; being [I].shtml[/I] or [I].php[/I] respectivly.
Copy linkTweet thisAlerts:
@JagBallsauthorFeb 25.2006 — you lost me with the "save with the correct extension; being .shtml or .php respectivly" do I save the target with one of these extensions?
Copy linkTweet thisAlerts:
@pcthugFeb 25.2006 — No, instead of saving your html page with a [I].html[/I] extension save it with a [I].shtml[/I] if you are using the SSI(Server-side include): [I]<!--#include file="path/to/file.txt" -->[/I] method, and save it with a [I].php[/I] extension if using the PHP: [I]<?php include('path/to/file.txt'); ?>[/I] method.

Please note: These methods will only work if you have a Server with SSI or PHP installed on it
×

Success!

Help @JagBalls 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.7,
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,
)...