Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图让下面的代码工作。目前它什么都不输出,一个空白页。
if($vUrlDetails = simplexml_load_file($vUrl)) { // Do something }
如果我使用file_get_contents()并将其保存到文件然后使用simplexml_load_file().
file_get_contents()
simplexml_load_file()
通过使用 URL 加载 XML 文件是否有限制simplexml_load_file()?
我想你可以试试:
<?php // http://www.php.net/manual/en/simplexmlelement.construct.php $xml = new SimpleXMLElement('http://my.url.com/something.xml', 0, true); ?>