Hi there,
I am trying to get some data from the dbpedia endpoint using ARC2.
The following code is a sample that I want for a simple test. When I
run this code, I do not get any message.
include_once("/rdf/arc/ARC2.php");
$dbpconfig = array(
"remote_store_endpoint" => "
http://dbpedia.org/sparql",
);
$dbpedia = ARC2::getRemoteStore($dbpconfig);
$dbpuri = "
http://dbpedia.org/resource/2PM";
$query = "
SELECT ?name, ?wikipedia
WHERE
{ <$dbpuri> foaf:name ?name ;
foaf:page ?wikipedia .
}";
$dbpArtist = $dbpedia->query($query, 'row');
echo $dbpArtist['name'];
The query is worked well in endpoint (
http://dbpedia.org/sparql). But,
with this code, a single parameter is allowed. For example, the
following query and code is fine. I have changed the code and query in
several times, I didn't find a solution so far. What is a problem?
Thanks in advance.
$query = "
SELECT ?name
WHERE
{ <$dbpuri> foaf:name ?name .
}";
- haklae