Jump to content

Writing to txt files


komquat

Recommended Posts

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
Link to comment
https://forums.phpfreaks.com/topic/7049-writing-to-txt-files/#findComment-25583
Share on other sites

Archived

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

×
×
  • Create New...

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.