Christian-Asche.com

Der Blog des Webentwicklers

Main menu

Skip to primary content
Skip to secondary content
  • Home
  • Impressum
  • Was ist das hier?

Daily Archives: 22. August 2007

Tests automatisch bei Aufruf über CLI ausführen

Posted on 22. August 2007 by Christian Asche

aus dem PHP Manual, user contributed notes:
class foo{}

$isCLI = (bool) ('cli'===php_sapi_name());
$isNI = (bool) (__FILE__===realpath(getcwd().DIRECTORY_SEPARATOR.$_SERVER['argv'][0]));
if( $isCLI && $isNI ) {
/* Bei direktem Aufruf aus der Konsole */
}

Posted in PHP

Recent Posts

  • Profiling von PHP Applikationen mit XHProf unter Ubuntu
  • …
  • Beauty Retusche
  • Variablen in der Shell (bash)
  • Apache und PHP unter Windows und Linux

 

August 2007
M T W T F S S
« Jul   Oct »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

  • Allgemein
  • Beauty
  • CSS
  • Das Leben
  • Firefox
  • htaccess
  • icons
  • IE
  • IT Business
  • Javascript
  • Links
  • Linux
  • mSQL
  • mySQL
  • Oracle
  • Outlook
  • Perl
  • Photoshop
  • PHP
  • PHPUGFFM
  • PostgreSQL
  • provider
  • Snipped
  • subversion
  • tortoisesvn
  • Tutorials
  • Windows
  • XHTML
  • XML
Proudly powered by WordPress