Re: Writing to Files
| From: | R'twick Niceorgaw | Date: | Fri, 05 Apr 2002 17:08:37 +0000 |
| Subject: | Re: Writing to Files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-91746@lists.php.net to get a copy of this message | ||
http://www.php.net/manual/en/function.printf.php
try sprintf to format the string and then fwrite
I use text files to log debug msgs in my programs as they are not too heavy
duty applications.
----- Original Message -----
From: "Sebastian A." <sebi@xinium.com>
To: "PHP General List (PHP.NET)" <php-general@lists.php.net>
Sent: Friday, April 05, 2002 11:29 AM
Subject: [PHP] Writing to Files
> Hey All,
> I have recently been trying to create some logs for the install script I
> have been making (to make it easier for me to diagnose problems) but I am
> wondering how to create and write to text files. I know about the fopen()
> and fwrite() functions, which theoretically should enable me to do this
> however I am not exactly sure how I should go about this. Also, I realize
> that there is limited formatting I can have with text, however I would
like
> to know if its possible to control the line spacing between the entries,
and
> whether or not its possible to indent lines. Lastly, are text files a good
> idea for logs? Do any of you use anything else I should be aware of?
>
> Thanks for all your help!
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>