write in a fil log the result of one echo
am 25.09.2007 19:59:01 von artev
if I have this code
if (VAR1) {echo ""; }
?>
that make comments in html's page source;
how I can to achieve all in a file (and not send in html page) ?
and is also possible to make a file every day so not write always in same
file, but every day to make automatically a file where to write; ?
Re: write in a fil log the result of one echo
am 26.09.2007 00:35:48 von Jerry Stuckle
artev wrote:
> if I have this code
>
> if (VAR1) {echo ""; }
> ?>
>
> that make comments in html's page source;
>
> how I can to achieve all in a file (and not send in html page) ?
>
> and is also possible to make a file every day so not write always in same
> file, but every day to make automatically a file where to write; ?
You need to set the content type to the appropriate value. See the PHP
header() function.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: write in a fil log the result of one echo
am 26.09.2007 06:46:16 von Preventer of Work
artev wrote:
> if I have this code
>
> if (VAR1) {echo ""; }
> ?>
>
> that make comments in html's page source;
>
> how I can to achieve all in a file (and not send in html page) ?
>
> and is also possible to make a file every day so not write always in same
> file, but every day to make automatically a file where to write; ?
You can use the php file functions.
http://www.php.net/manual/en/ref.filesystem.php
Open file for append
Write your stuff
Close the file
To make a new file every day, use the date function to create a filename
such as
20070925.log
without too much effort.
I would give you code, but only have a minute.