Raspberry Pi C++ PHP Gpio
<p>I'm quite new at programming and I need some help with an understanding of the following problem.  I have PHP page which controls some C++ functions and These functions control GPIO of RPi.  when I run C++ function everything runs without any problem then I try to run a same C++ function with PHP script it doesn't work. </p>

<p>Thank you a lot for your help and advice
Have a nice Holidays </p>

<p>C++ </p>

<blockquote>
<pre><code>&gt; #include &lt;iostream&gt;
&gt; #include &lt;wiringPi.h&gt;
&gt; 
&gt; int main(int argc,char* argv[]) {
&gt; 
&gt;  std::cout&lt;&lt; argc+5; // this line returns the value to PHP script 
&gt;     wiringPiSetupGpio();    pinMode (17, OUTPUT) ;
&gt; 
&gt;   for (int i=0; i &lt; 10; i++)   {
&gt;     digitalWrite (17, HIGH) ; delay (500) ;
&gt;     digitalWrite (17,  LOW) ; delay (500) ;   } 
&gt;     return 0;
</code></pre>
</blockquote>

<p>PHP</p>

<blockquote>
<pre><code>   &lt;?php


       $foo = True; 
           if(isset($_GET['on'])){
              exec('./blink a b c d',$result);
              echo implode($result);               
           }

 ?&gt;
</code></pre>
</blockquote>