Advertisement
Guest User

Untitled

a guest
May 27th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. <?
  2.  
  3. header('Content-Type: application/json');
  4.  
  5.  
  6.     $commands = [
  7.                 'cd /var/www/telelog',
  8.                 'source /var/www/telelog/env/bin/activate ',
  9.                 '/var/www/telelog/env/bin/python /var/www/telelog/send_sms.py config_ip ' . $_GET['user_id'] ];
  10.  
  11. #    exec('/bin/bash -c "'.implode(' && ', $commands) .'"', $output, $return_var);
  12.  
  13. print_r(\Yii::$app->params['configName']);
  14.  
  15.  
  16. #print_r($output);
  17. #echo '<br>';
  18. #print_r($return_var);
  19. if($return_var == 0){
  20. echo json_encode(['result' => true]);
  21. } else {
  22. echo json_encode(['result' => false]);
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement