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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 07:01:28 2024 UTC