[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/framework/3rdParty/PhpShell/PHP/Shell/Extensions/ -> LoadScript.php (source)

   1  <?php
   2  
   3  class PHP_Shell_Extensions_LoadScript implements PHP_Shell_Extension {
   4      public function register() {
   5          $cmd = PHP_Shell_Commands::getInstance();
   6  
   7          $cmd->registerCommand('#^r #', $this, 'cmdLoadScript', 'r <filename>', 
   8              'load a php-script and execute each line');
   9  
  10      }
  11  
  12      public function cmdLoadScript($l) {
  13          $l = substr($l, 2);
  14  
  15          if (file_exists($l)) {
  16              $content = file($l);
  17  
  18              $source = array();
  19  
  20              foreach ($content as $line) {
  21                  $line = chop($line);
  22  
  23                  if (preg_match('#^<\?php#', $line)) continue;
  24  
  25                  $source[] = $line;
  26              }
  27  
  28              return $source;
  29          }
  30          return "";
  31      }
  32  }


Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7