> Hi,
> i would like to know if it is possible to include a text file
> (all the text contained in the file) into a webpage.
> i explain: i already got text files, and now have HTML pages, but
> don't want to copy texts for weight place .
>
> If such function exist (whether in HTML, DHTML, javascript or
> why not PHP), could you help me plz?
In PHP, you can do :
include ("texte.txt");
If it isn't preformated and you want to add a <br /> at
every end of line, you can try :
print (nl2br (file_get_contents ("texte.txt")));
instead, but your PHP version needs to be at least 4.3.0.
There is another way to do it with older version but it is
a bit more complicated, if you want to know it, just ask
There is probably a way to do it in javascript, but I
wouldn't recommend it...
--
SeeSchloß -
http://www.seeschloss.net