/**
  * Make sure options can not be introduced in filename input.
  *
  * @issue https://github.com/pear/System_Launcher/issues/1
  * @return void
  */
 public function testOptionsAreStripped()
 {
     $launcher = new System_Launcher(array(new System_Launcher_Driver_GoodLs()));
     $returnStatus = $launcher->launch('-Afg .');
     $this->assertFalse($returnStatus);
     $this->assertEmpty($launcher->getLastOutput(), 'This should have failed, producing no output.');
 }
Example #2
0
<?php

/** Open an URL
 *
 * PHP version 5
 * 
 * @category System
 * @package  System_Launcher
 * @author   Christian Weiske <*****@*****.**>
 * @author   Olle Jonsson <*****@*****.**>
 * @license  http://www.gnu.org/licenses/lgpl.html LGPL
 * @link     http://github.com/olleolleolle/System_Launcher
 * @since    File available since Release 0.1.0
 */
require_once 'System/Launcher.php';
$launcher = new System_Launcher();
$launcher->launch('http://pear.php.net', true);
Example #3
0
<?php

require_once 'System/Launcher.php';
echo getcwd();
$launcher = new System_Launcher();
$launcher->launch('autoQuit.xlsm');
echo __DIR__ . PHP_EOL;
echo 'sd111231231231231231fsdf';
return;
$a = 1;
Example #4
0
<?php

/**
 * Open an HTML file
 *
 * PHP version 5
 * 
 * @category System
 * @package  System_Launcher
 * @author   Christian Weiske <*****@*****.**>
 * @author   Olle Jonsson <*****@*****.**>
 * @license  http://www.gnu.org/licenses/lgpl.html LGPL
 * @link     http://github.com/olleolleolle/System_Launcher
 * @since    File available since Release 0.1.0
 */
require_once 'System/Launcher.php';
$launcher = new System_Launcher();
$launcher->launch(dirname(__FILE__) . '/test.htm', true);