#23422 [Bgs]: $string1.$string2 does not always work properly
| From: | janez at pinkponk dot com | Date: | Wed, 30 Apr 2003 11:20:00 +0000 |
| Subject: | #23422 [Bgs]: $string1.$string2 does not always work properly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-38819@lists.php.net to get a copy of this message | ||
ID: 23422
User updated by: janez at pinkponk dot com
Reported By: janez at pinkponk dot com
Status: Bogus
Bug Type: Filesystem function related
Operating System: XP
PHP Version: 4.3.2RC2
New Comment:
Sorry to bug you for http://bugs.php.net/bug.php?id=23422. There is a
bug anyway, as I found out, but not in PHP, but in IE6.0, that saved
that page. Instead of adding "<!DOCTYPE HTML PUBLIC " in the beginning
of the file, IE6.0 added "<!DOCTYPE HTML PUBLIC ".
But "" at the beginning of file was happily ignored by most of
windows texteditors if it occured at the beginning of the file. I had
to use WinHex to see it at the beginning...
Happy coding :)
Previous Comments:
------------------------------------------------------------------------
[2003-04-30 05:38:49] sniper@php.net
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.
.
------------------------------------------------------------------------
[2003-04-29 21:01:14] janez at pinkponk dot com
Short description:
$string1='<?php ';
$string2= fread( IE6.0 saved file from "Google Search: site:www.php.net
rmdir"
$string3=' ?>'
$newstring=$string1.$string2.$string3
or newstring=implode($strings -from array)
instead of $string1.$string2.$string3 I get the following:
$string1.''.$string2.$string3
I don't know why there should be an '' in the file. A file saved
IE6.0 from www.aljazeera.net works fine. And so do other files. I tried
opening files both in ascii and binary-forced mode. It seems that there
is a problem with string concatenation.
Anyway, even if it's not a bug (I'm new to PHP), I would like to know
how to circumvent it.
Source code at http://www.janez.info/googlebug/
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23422&edit=1