Text file retrieval

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
Watch

Alpha

Established Member
Impact
0
Someone earlier asked me how they could retrieve everything from a text file and put it as the default text for a TEXTAREA form thing. For example, get the text from message.txt and place it in
Code:
<TEXTAREA NAME="textarea" ROWS="5" COLS="40" WRAP="physical">text from text file here</TEXTAREA>
Does anyone know how to do this so it is safe with most versions of PHP?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains — AI StorefrontUnstoppable Domains — AI Storefront
fopen?
PHP:
<?php
$handle = fopen ("/home/rasmus/file.txt", "r");
?>

then echo $handle, the R denotes that the file is being opened for read only or you can try this way

PHP:
<?php include("file.txt"); ?>


:)
 
0
•••
Ok Thanks :)
 
0
•••
Appraise.net

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back