PDA

View Full Version : Tiny text script thing-a-ma-bob


Useless
2006-01-05, 12:20 PM
Anyone know of a light script that can overwrite a single text file from a form? In other words, I want to be able to paste a bunch of text into a <textarea> of a form, hit submit, and have it overwrite what ever info is on data.txt, for example.

I can probably reverse engineer some bigger script that stores data on flatfiles and figure out how it's done, but if anyone knows of a small script that does that, I'd be eternally grateful, or at least until I fuck it all up.

MadMax
2006-01-05, 12:28 PM
You can use part of Recip Philes for that, and it's already on your server :). Hit me up on ICQ if you're on tonight and we'll work it out

cd34
2006-01-05, 01:24 PM
$filename = "/full/path/to/filename";
$handle = fopen($filename,"wb");
fwrite($handle,$_REQUEST['textareaname']);
fclose($handle);

Useless
2006-01-05, 02:34 PM
Awesome, Chris! Thanks tons.|thumb Works like a charm.

Madmax, I'll probably hit you up anyway just to keep your productivity levels low. :D

Chop Smith
2006-01-05, 05:38 PM
...Madmax, I'll probably hit you up anyway just to keep your productivity levels low. :D

Lets keep Max's productivity high. February is closing in on him. :D

MadMax
2006-01-05, 08:04 PM
Lets keep Max's productivity high. February is closing in on him. :D

Bastards :D

Chop Smith
2006-01-05, 08:21 PM
Bastards :D
:D Say UW, is this an upgrade from Cocksuckers? And I am not productive so answer your ICQ as you have a chance

Useless
2006-01-05, 08:29 PM
:D Say UW, is this an upgrade from Cocksuckers? And I am not productive so answer your ICQ as you have a chanceIt's far less offensive, but no where near as endearing.

ICQ? How do you spell that? I'll google it.