0

我正在使用 GrapheneDB,我尝试重新使用我用来从 AWS 服务器连接到 Neo4J 服务器的代码。但它没有将数据插入 GrapheneDB,我不知道这里出了什么问题。以前,我使用过,localhost:7474但现在我使用的是以下 URL。我怎样才能让它工作?

$http="http://username:password@hobby-1312.dbs.graphenedb.com:2789/db/data/cypher/";
$data =' MERGE (a:User {name:"name",id:"id" }) ';
$data = array("query" =>$data);
$data_string = json_encode($data);
$ch = curl_init($http);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data_string))
);
$result = curl_exec($ch);
4

1 回答 1

0

我是 GrapheneDB 的 Judit。您共享的代码应该可以工作。您可能在限制性防火墙后面吗?我们的实例在非标准端口上运行,一些防火墙阻止访问。

于 2016-12-23T14:15:32.613 回答