-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