在本地计算机上运行ne4jphp/ne4jphp.phar时,Noe4j - 1.9.RC2似乎工作正常。此外,web界面也可用。
运行命令时(如下所示)
$arthurOutgoingRelationships = $arthur->getRelationships(array(), Relationship::DirectionOut);,我正在
PHP Fatal error: Class 'Relationship' not found in /var/www/index.php在Apache错误日志中。我下载了neo4jphp的最新版本,并注册了自动加载器:
spl_autoload_register(function ($className) {
$libPath = '/var/www/neo4jphp/lib/';
$classFile = str_replace('\\',DIRECTORY_SEPARATOR,$className).'.php';
$classPath = $libPath.$classFile;
if (file_exists($classPath)) {
require($classPath);
}
});发布于 2013-05-10 07:59:30
您可以通过从GitHub下载该库来解决此问题,复制根目录中的Everyman文件夹及其子文件夹,并使用所需的内容。示例中
require("phar://neo4jphp.phar");
use Everyman\Neo4j\Relationship;https://stackoverflow.com/questions/16461864
复制相似问题