EasyRDF example not working for me on server

166 Views Asked by At

I'm setting up easyrdf for a project so I'm trying the homepage example. Locally all is fine. However as soon as I change the file different to the example one (http://njh.me/foaf.rdf) or doing the same example code w/ same graph but on a server, It's not working anymore. I use composer to install easyrdf.

The example is:

<?php
require 'vendor/autoload.php';

$foaf = new EasyRdf\Graph("http://njh.me/foaf.rdf");
$foaf->load();
$me = $foaf->primaryTopic();
echo "My name is: ".$me->get('foaf:name')."\n";

?>

I get Class 'EasyRdf\Graph' not found (0). Whats the cause of it not working on the server?

0

There are 0 best solutions below