【发布时间】:2011-08-05 12:25:14
【问题描述】:
我正在尝试使用来自DOMDocument 的函数schemaValidate(String file) 针对 XSD 验证 XML 文件。
当我在其他工具(如在线验证器)上对其进行验证时,它工作正常,但在我的程序中,我总是收到此错误,并且真的找不到它的来源:
Warning: DOMDocument::schemaValidate(/home/public_html/product/xxxx/xxxx/xxxxx/xsd/AdlSchema.xsd): failed to open stream: Permission denied in /home/public_html/xxxx/xxxx.php on line 209 Warning: DOMDocument::schemaValidate(): I/O warning : failed to load external entity "/home/public_html/product/xxxx/xxxx/xxxx/xxxx/xsd/AdlSchema.xsd" in /home/public_html/xxxx/xxxx.php on line 209 Warning: DOMDocument::schemaValidate(): Failed to locate the main schema resource at '/home/public_html/product/xxxxx/xxxxx/xxxxx/xxxx/xsd/AdlSchema.xsd'. in /home/public_html/xxxx/xxxxx.php on line 209 Warning: DOMDocument::schemaValidate(): Invalid Schema in /home/public_html/xxxx/xxxx.php on line 209
所以我的问题是,有没有办法使用 DOMDocument 函数获取有关此错误(主要是 Invalid schema one)的更多详细信息?如果有人能说出什么会导致这种错误,那就太好了(xml 和 xsd 是一种机密,抱歉,但它再次与其他一些工具一起工作得很好)。
谢谢!
【问题讨论】:
-
第一个错误表示架构文件的权限被拒绝。你确定这不是问题吗?
标签: php xml xsd domdocument