我正在尝试从ssh服务器显示xml文件。我的连接正在工作,我可以显示文件,但只能显示警告。我在互联网上搜索了更多说明,但没有发现任何东西,这就是为什么我今天在这里。如果您有什么想法,请不要害羞:)
先谢谢了。
代码:
$stream = ssh2_exec($connection, 'cat //Talend//PEC_DF6//FluxSortantAdmissionPEC//ARCHIVES//XML//wzadyyyy.0001057582.ap.xml');
stream_set_blocking($stream, true);
$output = stream_get_contents($stream);
$xqc = simplexml_load_file($output);
echo "<pre>$xqc</pre>";die();
错误:
Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning :
failed to load external entity
"<?xml version="1.0" encoding="UTF-8"?>
<BL_RA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="Resultats_Admission_2.04.xsd">
<ResultatAdmission CodeEtatSuiviDepot="ECPEC" DateEtatSuiviDepot="22-01-
2019" DateDepot="21-01-2019" HeureDepot="20:00" CodeSiteDepot="932930">
<Identification NumeroBIP="0000809106"> <IdentificationDepot
NumDepot="MA570430"/> <Publication IDPCD="1482270" NoParution="331"
TypeParution="SUP1"/> </Identification> </ResultatAdmission> </BL_RA> "
in D:\www\SAGAPEC\application\modules\supervision\controllers\AdminController.php on line 386
原始XML文件:
<?xml version="1.0" encoding="UTF-8"?>
-<BL_RA xsi:noNamespaceSchemaLocation="Resultats_Admission_2.04.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-<ResultatAdmission CodeSiteDepot="932930" HeureDepot="20:00"
DateDepot="21-01-2019" DateEtatSuiviDepot="22-01-2019"
CodeEtatSuiviDepot="ECPEC">
-<Identification NumeroBIP="0000809106">
<IdentificationDepot NumDepot="MA570430"/>
<Publication TypeParution="SUP1" NoParution="331"
IDPCD="1482270"/>
</Identification>
</ResultatAdmission>
</BL_RA>