#49644 [Opn->Bgs]: explode() does not work in this case
| From: | sjoerd@php.net | Date: | Thu, 24 Sep 2009 19:29:28 +0000 |
| Subject: | #49644 [Opn->Bgs]: explode() does not work in this case | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-142839@lists.php.net to get a copy of this message | ||
ID: 49644
Updated by: sjoerd@php.net
Reported By: iddover at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Strings related
Operating System: Centos 5.2
PHP Version: 5.3.0
New Comment:
Thank you for your bug report.
The behavior you report is not a bug. The boundary you specify simply
does not occurs in the file. Note that explode() is case sensitive. The
boundary in the file is uppercase, and in your variable it is
lowercase.
// In file: --========/4AB98633000BEC76/empmaa12.ono.com
$boundary = "--========/4ab98633000bec76/empmaa12.ono.com";
Different: ^^ ^^^
Previous Comments:
------------------------------------------------------------------------
[2009-09-24 18:20:28] iddover at gmail dot com
I think is not the only case,
http://cms.tempel.es/merda.eml.txt
------------------------------------------------------------------------
[2009-09-23 16:20:59] jani@php.net
And what might that file contain?
------------------------------------------------------------------------
[2009-09-23 13:39:24] iddover at gmail dot com
Description:
------------
Explode doesn't works in this case
Reproduce code:
---------------
<?php
$boundary = "--========/4ab98633000bec76/empmaa12.ono.com";
$content = file_get_contents('merda.eml.txt');
print_r( explode($boundary, $content));
?>
Expected result:
----------------
To explode into array?
Actual result:
--------------
Array with only 1 element
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49644&edit=1