Hi, I come here to all you gurus, to search help.
I would like to know how to make a web-page get is text from a external file, is it possible?
Does it need a script, wich language is best?
Thank you.
Ignatheos
External Text Data
Started by Ignatheos, May 28 2007 03:55 AM
3 replies to this topic
#1
Posted 28 May 2007 - 03:55 AM
#2
Posted 28 May 2007 - 04:20 AM
imo, the easiest way to load plain external data is by using file_get_contents
$foo = file_get_contents('path/to/text_file.txt');
print($foo);
#3
Posted 28 May 2007 - 12:31 PM
He's using PHP just for your information.
(He did ask what language too, Av.)
(He did ask what language too, Av.)
#4
Posted 28 May 2007 - 02:12 PM
You could also do it with ajax, something like calling this javascript function:
Then just load the content with somehting like this in your html page:
ajax_loadContent('sampletext','external/externalfile.xxx);
Then just load the content with somehting like this in your html page:
<DIV id="sampletext"></DIV>
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
