|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-09-01 16:37 UTC] sjoerd@php.net
[2009-09-09 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 16:00:02 2025 UTC |
Description: ------------ I submit an attachment and then send via XML inside a node. When I attach a file larger than 12k this function creates an empty node with no evident error report on php. (This is only a sample of the real code) Reproduce code: --------------- function creaElem($name, $value="", $parent=null) { $el=$this->Document->createElement($name); if ($value!="") $el->appendChild($this->Document->createTextNode($value)); if ($parent!=null) $parent->appendChild($el); return $el; } function AttachFile($parentnode,$attachmentname) { \\ $packet->creaElem("nomefile",$attachmentname,$parentnode); $newnode=$packet->creaElem("attach","",$parentnode); $whatsinside=file_get_contents ($_FILES['attachment']['tmp_name']); $cdata=$this->Document->createCDATASection(base64_encode($whatsinside)); $newnode->appendChild($cdata); } Expected result: ---------------- When I run AttachFile(..) and My attachment size is larger than 12k this function creates an empty node. With attachments<12k it works. Any suggestion? Thanks in advance