Моя структура каталогов:Как использовать этот класс PHP в моем коде?
bencode_test-
|--> BEncode.php
|--> bencode_test.php
|--> ubuntu-15.10-desktop-amd64.iso.torrent
my code:
<?php
require 'BEncode.php';
$bcoder = new BEncode();
$torrent = $bcoder->bdecode(File::get('ubuntu-15.10-desktop-amd64.iso.torrent'));
var_dump($torrent);
?>
Я получил BEncode.php от this Github account.
Когда я запускаю мой код, bencode_test.php из командной строки, то ошибка, я получаю:
PHP Fatal error: Class 'BEncode' not found in /home/user/bencode_test/bencode_test.php on line 3
Может кто-нибудь сказать мне, что я делаю неправильно?
Спасибо, Абдулла. Можете ли вы рассказать мне, почему создатель использовал новый оператор на своем README.md? – user465001
http://stackoverflow.com/questions/8655937/what-is-the-difference-between-readme-and-readme-md-in-github-projects –