Hi...
in PHP code,
How can I save text? and to read text file and fill in text area?
can you please share just a piece of code....I really need it..asap!!!
thanks in advance....
Hi...
in PHP code,
How can I save text? and to read text file and fill in text area?
can you please share just a piece of code....I really need it..asap!!!
thanks in advance....
To read text (and output to browser):
to save text:Code:<?php echo file_get_contents('file.txt'); ?>
For more information, visit php.net's website and look up the following commands:Code:<?php $content = 'This is a test text file saved by using a php script!'; $fp = fopen('file.txt', w); fwrite($fp, $content); fclose($fp);
fopen, fwrite, file_get_contents, file
Hope this helps.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design
Bookmarks