php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11460 \n or \r\n?
Submitted: 2001-06-13 05:05 UTC Modified: 2001-06-13 13:35 UTC
From: wuxinan at stanford dot edu Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.0.5 OS: Win98
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: wuxinan at stanford dot edu
New email:
PHP Version: OS:

 

 [2001-06-13 05:05 UTC] wuxinan at stanford dot edu
the thing is, my PHP running in CGI PHP and module PHP (PHP running as a module of Apache 1.3.20) have different results. PHP is not portable!

use fread() and .= operation, I read the entire file into a string, and use count(split(string, "\n")); to find out how many lines there. This basically works well if this PHP file is invoked by PHP module.

However, this doesn't work if PHP is running in CGI mode.
I have to change to "\r\n" then the script gives the same result.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-13 13:35 UTC] sniper@php.net
Yeah, isn't Windows buggy shit or not? 
Send a bug report to them.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 00:01:29 2025 UTC