komquat Posted April 10, 2006 Share Posted April 10, 2006 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 Link to comment https://forums.phpfreaks.com/topic/7049-writing-to-txt-files/ Share on other sites More sharing options...
kenrbnsn Posted April 10, 2006 Share Posted April 10, 2006 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.