Jump to content

Archived

This topic is now archived and is closed to further replies.

komquat

Writing to txt files

Recommended Posts

Could someone please point me in the direction of a good tutorial/demo/guide for writing php POST info to a .txt file.

Thanks in advance

Share this post


Link to post
Share on other sites
It really depends on what information you want to put in the file and how you want it to appear. If you just want to dump all the information in the $_POST array into the file, you can do:
[code]<?php
$fp = f open('textfile.txt','w');
f write($fp, print_r($_POST,true) . "\n");
f close($fp);
?>[/code]

(remove the spaces in the function names)

Ken

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.