ID: 29014 Updated by: [EMAIL PROTECTED] Reported By: zxc at zmail dot ru -Status: Open +Status: Bogus Bug Type: PCRE related Operating System: Windows XP build 2600 PHP Version: 4.3.7 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. . Previous Comments: ------------------------------------------------------------------------ [2004-07-05 11:36:42] zxc at zmail dot ru Description: ------------ I want to have strings without \r\n from my conf file. Conf file: #>>>> ./inc/conf.inc.dat #>>>> key=value (with \r\n) //Line:0>path=./user-sleepy/ //Line:1>access=moder //Line:2>password=36Fhenw7spw But after parsing script, the code returns strings with \r\n, why? Maybe bug? Because i found in docs: "By default, PCRE treats the subject string as consisting of a single "line" of characters (even if it actually contains several newlines)". Reproduce code: --------------- <? function rconf($ConfPath) { [EMAIL PROTECTED]($ConfPath,"r") or die("Cannot read!"); while(!feof($OpConf)) { preg_match("/.+/",FGets($OpConf),$matches); echo $matches[0]; } FLock($OpConf,LOCK_EX); FClose($OpConf); } rconf("./inc/conf.inc.dat"); ?> Expected result: ---------------- path=./user-sleepy/access=moderpassword=36Fhenw7spw (without \r\n) Actual result: -------------- path=./user-sleepy/ access=moder password=36Fhenw7spw ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29014&edit=1
