我不得不在我的Laravel 5.1项目中使用简单的RDF库,我有一些问题。我已经将这个库添加到我的composer.json文件中,并安装了它,现在我有了以下代码:
public function index()
{
$foaf = new EasyRdf_Graph("http://biblioteka.wejherowo.pl/dlibra/dlibra/rdf.xml?type=e&id=1589");
$foaf->load();
$me = $foaf->primaryTopic();
dd($me->get('dc:title'));
}但是当我试图显示一些关于格式的错误时,我必须配置这个库吗?
这是屏幕:

发布于 2015-11-17 00:04:02
由于即使使用格式提示rdfxml作为ctor中的第三个参数,也无法加载此图URI,请尝试间接加载它:
$file = file_get_contents('http://biblioteka.wejherowo.pl/dlibra/dlibra/rdf.xml?type=e&id=1589');
$parser = new EasyRdf_Parser_RdfXml();
$graph = new EasyRdf_Graph();
$parser->parse($graph, $file, 'rdfxml', null);
print $graph->dump('text');但是,这并没有回答您关于格式错误的问题。
https://stackoverflow.com/questions/33735798
复制相似问题