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条)

报告相同问题?

悬赏问题

  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等
  • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
  • ¥15 qt6.6.3 基于百度云的语音识别 不会改
  • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行