php - DOMDocument->loadHTMLFile() I/O warning : failed to load external entity, only fails when called by ajax
one text
Solution:
Swapping the relative path in $eventDom->loadHTMLFile('templates/form_edit_event.html'); to an absolute path fixed the issue. The script that was throwing the error was in a different directory from the script which was working fine.
I'll be making a config file with some sort of $srcRoot variable for the sake of keeping some semblance of pseudo-relativity in the path names.
Source