Hey folks,
We're coding a project in .php and we have a contract that a members of our site agrees to.
It is generated dynamically so that the contract details that are seen on-screen indicate things like the users name.
So, even though it looks like a text file, its generated dynamically.
Question
is it possible to pass the text information and to save whats in there as a simple .txt file, including the info thats generated dynamically?
If so, what sort of commands could I use?
Thanks in advance.
Spock
Dynamically generated content to .txt file
Moderator: General Moderators
Re: Dynamically generated content to .txt file
There are a couple of associated functions that you should take a look at but here is a good starting point:
fwrite:
http://php.net/manual/en/function.fwrite.php
fwrite:
http://php.net/manual/en/function.fwrite.php
Re: Dynamically generated content to .txt file
Ok, sounds like good advice. Thanks Micknc.micknc wrote:There are a couple of associated functions that you should take a look at but here is a good starting point:
fwrite:
http://php.net/manual/en/function.fwrite.php
Re: Dynamically generated content to .txt file
You can fake something like a text file with header().
Code: Select all
<?php
header("Content-Type: text/plain");
echo "This text will be monospaced, just like in a text file.";