dongritan5654 2017-09-20 10:45
浏览 124
已采纳

如何将GraphAware Library添加到项目中

I am creating a project in php and want to configure it with my Neo4j graph data. Here is the code:

<?php
require_once '/path/to/Client.php';
use GraphAware\Neo4j\Client; 
use GraphAware\Neo4j\Client\ClientBuilder;
$client = new GraphAware\Neo4j\Client('http://127.0.0.1:7474/');

$client = ClientBuilder::create()
->addConnection('default', 'http://neo4j:password@127.0.0.1:7474')
->addConnection('bolt', 'bolt://neo4j:password@127.0.0.1:7474')
->build();  

so you can see that the library I am trying to use in GraphAware. I cannot get this library to work as I do not have it. Can someone please let me know how I can get this library in my php project which I am creating in eclipse.

  • 写回答

2条回答 默认 最新

  • douzhuo6931 2017-09-20 10:50
    关注

    As per the documentation, you use Composer to require it into your project.

    https://github.com/graphaware/neo4j-php-client#installation

    composer require graphaware/neo4j-php-client:^4.0
    

    Don't have composer? It's well worth installing, manages dependencies and autoloading, and all you need to do to get it working with any PHP project is to add this line pretty much at the start point of your script (index.php?)

    require_once 'vendor/autoload.php`
    

    Get Composer here https://getcomposer.org/

    The lame non-composer way is just download the Zip from github and dump it in your project. But you'll need to require in all the classes you use!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料