我正在使用GrapheneDB,并且我尝试重新使用我用来从亚马逊网络服务服务器连接到Neo4J服务器的代码。但是它没有将数据插入到GrapheneDB中,我不知道这里出了什么问题。以前,我使用的是使用的localhost:7474,但现在我使用的是以下网址。我怎么才能让它工作呢?
$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);发布于 2016-12-23 22:15:33
我是GrapheneDB的朱迪特。您共享的代码应该可以工作。您是否在受限的防火墙后面?我们的实例在非标准端口上运行,一些防火墙会阻止访问。
https://stackoverflow.com/questions/41287487
复制相似问题