blockchain api missing file?

0

https://github.com/blockchain/api-v1-client-php <== php files im working with.

When i do my first test with this new api i start off with the inits

<?PHP
// Include the autoload.php from its vendor directory
require 'vendor/autoload.php'

// Create the base Blockchain class instance
$Blockchain = new \Blockchain\Blockchain();

// Needed before calling $Blockchain->Wallet or $Blockchain->Create
$Blockchain->setServiceUrl('http://localhost:3000');
?>

But when i do this it says...

"Parse error: syntax error, unexpected '$Blockchain' (T_VARIABLE) in C:\xampp\htdocs\bitcoin\index.php on line 6"

Composer package was compiled correctly and in the root folder.

BTCDude

Posted 2018-02-04T20:21:03.320

Reputation: 41

U run the composer already right and under the same folder that the php file is on?zhiyan114 2018-02-04T20:24:06.607

It looks like you just haven't installed it properly, there is definitely a blockchain file (https://github.com/blockchain/api-v1-client-php/blob/master/src/Blockchain.php)

MeshCollider 2018-02-04T20:36:41.480

yes i went to my bitcoin folder with src, examples, doc, etc...i held shift and open command window there typed in "composer install" and that was the errors i was getting. check picture of composer error https://imgur.com/a/JAEgV

BTCDude 2018-02-04T20:36:59.850

well it looks like i was using a different bitcoin PHP. but the issue is still there, the composer was able to compile fine and i see the blockchain folder and blockchain.php But when i run the script with the same inits its still giving me the exact error for $BlockchainBTCDude 2018-02-04T20:43:23.647

No answers