-
Notifications
You must be signed in to change notification settings - Fork 45
Description
Hola, he intentado probar el código del proyecto y me ha dado el siguiente error:
Warning: SimpleXMLElement::__construct(): I/O warning : failed to load external entity "xml/blacklist.xml" in C:\wamp\www\Automatic-API-REST\inc\blackListClass.php on line 97
Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in C:\wamp\www\Automatic-API-REST\inc\blackListClass.php on line 97
Por lo visto, hay un error en ese archivo, el cual he solucionado sustituyendo la línea 97 de esto:
$doc = new SimpleXMLElement('xml/blacklist.xml', null, true);
a esto:
$doc = new SimpleXMLElement(file_get_contents('xml/blacklist.xml'));
al parecer no puede acceder al archivo únicamente con el string de la ruta, por lo que el método file_get_contents le proporciona lo necesario a SimpleXMLElement para que pueda crear su nueva instancia.
Espero que a las personas que les haya ocurrido les solucione el problema como a mi.
Un saludo y enhorabuena por el proyecto, es una gran idea que puede ahorrar un montón de tiempo de código.