Unstoppable Domains โ€” AI Assistant

Editable block of text into body of web page?

SpaceshipSpaceship
Watch

Gene

Gene PimentelTop Member
Impact
487
Let's say I have an existing web page, and on this web page is a block of text that I want to display, based on the contents of an exterior TXT file. Is there a simple way to include an outside block of text into the web page?

In other words, it's two files -- web page (index.html) and I want that web page to show the content of mytextfile.txt in a specific area of the page.

Thanks in advance for any pointers...
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Let me just clarify.. You're wanting to include content from a text file onto a web page? From a .txt file in a .html file?

Maybe I don't understand what you're talking about.. :p but anyway, it's very simple if you use PHP.

index.php [The page you wish the .txt files content to be inlcuded on]
PHP:
<html>
<head>
<title>Test</title>
</head>

<body>
<?php
$fp = file("yourfile.txt");
for($i = 0; $i <sizeof($fp);$i++){
echo $fp[$i]."<BR>";
}
?>
</body>
</html>

The content your wanting to include
yourfile.txt
Code:
Insert your content in this file.
Include anything you like.
TextTextTextTextTextTextTextText
TextTextTextTextTextTextTextText
TextTextTextTextTextTextTextText

You can see a demo here..

http://www.secondversion.com/testt.php
 
0
•••
Thank you! I'll experiment with that. I appreciate your time :)
 
0
•••
No problem :) You're welcome.

Gene..I've also wrote an admin function etc.. where you can login and edit via the web. Let me do some final tweaking. And :o :hehe:
 
0
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
CatchedCatched
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy โ€” Live Options
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back