shell exec - passing array containing list of urls to shell_exec function in php -


i creating code contain shell script in php.

when try run using shell_execute not getting actual result.

here's code:

  for($i;$i<5;){       $output = shell_exec('./url_integrity_check.sh ' ."'echo $test[$i]'" );       $i++;   } 

$test array contain list of values.

when run code takes $test[0] means top value of array every time, want loop through values of array , execute shell script each time increments value of $i

try this

for($i=0;$i<5; $i++){   $url = "./url_integrity_check.sh " . $test[$i];   $output = shell_exec($url);  } 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -