Hey all
I am tryng to do convert files details as base64 format and then wrireRaw into the xml file in php 5.1.2 and then covert it back to the original file format, but writeRaw is not supported in this php version. Is any other way to do. I tryed with xml "text" but it is nt working.
i am tryng to do in php 5.1.2 but "$this->xml->writeRaw(base6 4_encode($image s["file_data"]));" is not supporting .. any one have any idea about that please. Thanks
I am tryng to do convert files details as base64 format and then wrireRaw into the xml file in php 5.1.2 and then covert it back to the original file format, but writeRaw is not supported in this php version. Is any other way to do. I tryed with xml "text" but it is nt working.
Code:
function writeb64XML($images, $savePath = 'test.xml', $indentSource = false, $xmlVersion = '1.0') { $this->xml = new XMLWriter(); $this->xml->openURI($savePath); if ($indentSource) { $this->xml->setIndent(true); } $this->xml->startDocument($xmlVersion); $this->xml->startElement('images'); $this->xml->startElement('url'); $this->xml->Text($images["file_name"]); $this->xml->endElement(); $this->xml->startElement('source'); $this->xml->writeRaw(base64_encode($images["file_data"])); $this->xml->endElement(); $this->xml->endElement(); $this->xml->endDocument(); return true; }
Comment