-1
我嘗試打開一個XML,它位於MySQL數據庫中。字段的類型是「LONGBLOB」的,但我得到了以下錯誤:從PHP打開XML文件
Warning: simplexml_load_file(): I/O warning : failed to load external entity "<?xml version="1.0" encoding="utf-8"?><cfdi:Comprobante xmlns:cfdi="http://www.sat.gob.mx/cfd/3"
我的代碼:
public function select(){
$this -> conect = new conect("root", "....");
$data = $this -> conect -> conexion();
$dbquery = $data -> prepare("SELECT *
FROM FILE
ORDER BY ID
LIMIT 1
");
$dbquery -> execute();
$rows = $dbquery->fetch(PDO::FETCH_ASSOC);
$string = $rows['BYTES'];
$stream = fopen('php://memory','r+');
fwrite($stream, $string);
rewind($stream);
echo stream_get_contents($stream);
}
}
非常感謝您的回答,但您會爲此推薦嗎? – 2014-09-01 17:00:16
那麼,如所寫:看看溪流。也許有一個開始,這應該給你的想法:http://evertpot.com/222/ – arkascha 2014-09-01 17:04:40
我看我的升級,我錯了?對不起,我是一個新手...... :( – 2014-09-01 17:53:57