示例#1
0
 public function customScript($scriptName, $arguments = [])
 {
     $this->setScriptName($scriptName);
     $shellArguments = $this->generateOptions();
     $shellArguments[] = $this->getScriptName();
     $shellArguments = array_merge($shellArguments, $arguments);
     $this->executor->setArguments($shellArguments);
     return $this->executor->exec(true);
     //if infinity run, Issue https://github.com/ariya/phantomjs/issues/10845
 }
示例#2
0
 public function stopAll()
 {
     $executor = new PhpShell();
     $executor->parse('killall tor');
     $executor->exec(true);
 }