我是testingsimplexml_load_string()func。
<?php
ini_set('display_errors', '1');
$test = stripslashes($_POST['xml']);
$testing = simplexml_load_string($test);
print_r($testing);
?>
执行以下错误后,即使我正在分割斜杠。
Warning: simplexml_load_string(): Entity: line 1: parser error : Malformed declaration expecting version in /var/www/check.php on line 5
Warning: simplexml_load_string(): <?xml encoding='utf8'?><!DOCTYPE a[<!ENTITY e SYSTEM '/etc/passwd'>]><a>&e;</a> in /var/www/check.php on line 5
Warning: simplexml_load_string(): ^ in /var/www/check.php on line 5
Warning: simplexml_load_string(): Entity: line 1: parser error : Blank needed here in /var/www/check.php on line 5
Warning: simplexml_load_string(): <?xml encoding='utf8'?><!DOCTYPE a[<!ENTITY e SYSTEM '/etc/passwd'>]><a>&e;</a> in /var/www/check.php on line 5
Warning: simplexml_load_string(): ^ in /var/www/check.php on line 5
Warning: simplexml_load_string(): Entity: line 1: parser error : Entity 'e' not defined in /var/www/check.php on line 5
Warning: simplexml_load_string(): <?xml encoding='utf8'?><!DOCTYPE a[<!ENTITY e SYSTEM '/etc/passwd'>]><a>&e;</a> in /var/www/check.php on line 5
Warning: simplexml_load_string(): ^ in /var/www/check.php on line 5
我如何解决这个错误?