cliAction.php 922 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * 这个固定 文件名,方法名 参数
  4. * php task.php cli,run -key=a -key2=b
  5. */
  6. class cliClassAction extends runtAction
  7. {
  8. public function runAction()
  9. {
  10. echo 'Hello Xinhu Cli';
  11. }
  12. //测试队列用的
  13. public function testAction()
  14. {
  15. $rand = $this->getparams('rand');
  16. $this->option->setval('asyntest', $rand);
  17. return 'success';
  18. }
  19. //http://192.168.1.104/app/xinhu/task.php?m=cli&a=urltest
  20. public function urltestAction()
  21. {
  22. $id = $this->get('id');
  23. $id2 = $this->get('id2');
  24. echo $id2;
  25. echo '------';
  26. echo $id;
  27. }
  28. /**
  29. * (异步用)REIM即时通讯平台应用提醒
  30. */
  31. public function reimplatsendAction()
  32. {
  33. $body = $this->getparams('body');
  34. if(!$body)return;
  35. $cans = json_decode($this->jm->base64decode($body),true);
  36. return m('reimplat:agent')->sendxiao($cans['touid'],$cans['agentname'],$cans['wxarr'],true);
  37. }
  38. }
粤ICP备19079148号