2016-06-14 8 views
1

PHP 파일에 multichain의 json rpc api : https://github.com/Kunstmaan/libphp-multichain에 대해이 PHP 래퍼를 사용하고 있습니다.PHP가 필수 파일에서 클래스를 찾을 수 없습니다.

나는 아파치 오류 로그에 표시되는 오류는 다음과 같습니다

PHP Fatal error: Class 'MultichainClient' not found in /var/www/html/new.php on line 5

나는 내 코드를 조정하는 방법을 잘 모르겠어요과 래퍼 같습니다 내 코드 :

<?php 
     require_once 'libphp-multichain/src/be/kunstmaan/multichain/MultichainClient.php'; 
     require_once 'libphp-multichain/src/be/kunstmaan/multichain/MultichainHelper.php'; 
     $client = new MultichainClient("http://107.170.46.124:port",{usr},{pwd}); 
     print_r($client); 
</code> 

MultichainClient.php Code

답변

1

"MultichainClient"클래스는 네임 스페이스입니다. 클래스를 "호출"할 때 네임 스페이스와 클래스 이름을 사용해야합니다.

$client = new be\kunstmaan\multichain\MultichainClient();