hey i want to edit a txt file on my site when some one goes to the admin panel on my site can some one tell me howto please?
Help
| Code: |
| <?php
echo "<form method=post action=notepad.php?action=edit><textarea cols=60 rows=20 name=edit>"; $file = "TEXTFILE.txt"; $fh = fopen($file, 'r'); $theData = fread($fh, filesize($file)); echo $theData; fclose($fh); echo "</textarea><br><input type=submit value=Update></form>"; if($_GET['action'] == 'edit') { $fh = fopen($file, 'w') or die("can't open file"); $stringData = $_POST['edit']; fwrite($fh,stripslashes($stringData)); fclose($fh); } echo "</center>"; ?> |
| NG wrote: |
| hey i want to edit a txt file on my site when some one goes to the admin panel on my site can some one tell me howto please? |
| siena wrote: | ||
|
He said it will be for his admin panel so it will be for the site not cpanel
