user45239: i installed a bitcoind core and i access bitcoin-cli command in linux terminal with developer command(getbalance, getaccountaddress etc.) but i want run this command in php file.
my php code is:
chdir('/home/itr/Downloads/bitcoin/bin');
$output = shell_exec("./bitcoin-cli getbalance");
echo var_dump($output); 

bitcoin-cli file path:

/home/itr/Downloads/bitcoin/bin

please tell me what i do?

user44818: I would definitely not do it this way and use a RPC client. A very simple one is https://github.com/aceat64/EasyBitcoin-PHP

45239: <p>i installed a bitcoind core and i access bitcoin-cli command in linux terminal with developer command(getbalance, getaccountaddress etc.) but i want run this command in php file.</p>

<p>my php code is:</p>

<pre><code>chdir('/home/itr/Downloads/bitcoin/bin');
$output = shell_exec("./bitcoin-cli getbalance");
echo var_dump($output); 
</code></pre>

<p>bitcoin-cli file path:</p>

<blockquote>
  <p>/home/itr/Downloads/bitcoin/bin</p>
</blockquote>

<p>please tell me what i do?</p>
 44818: <p>I would definitely not do it this way and use a RPC client. A very simple one is <a href="https://github.com/aceat64/EasyBitcoin-PHP" rel="nofollow noreferrer">https://github.com/aceat64/EasyBitcoin-PHP</a></p>
