Re: Unix end of line versus windows end of line
| From: | Curt Zirzow | Date: | Tue, 26 Aug 2003 01:44:47 +0000 |
| Subject: | Re: Unix end of line versus windows end of line | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-160709@lists.php.net to get a copy of this message | ||
* Thus wrote Bohdan Blaha (blaha@jobpilot.cz):
> Hi,
>
> I use PHP with apache on two systems..
> (linux and windows)
>
> when I use PHP on linux, it is ok.. I get Unix end of line, when I write to the file with
> fwrite function...
> when I run the same script on windows machine, I get Unix end of line too, but I need there
> windows end of line,...
>
> is it configuration of php.ini?? or how can I set it???
I believe your looking for the 't' option in fopen.
http://php.net/fopen
It will translate end of lines. Also there is a setting in the
php.ini file called:
auto_detect_line_endings
Which effects the line endings when reading a file with fgets().
HTH,
Curt
--
"I used to think I was indecisive, but now I'm not so sure."