The Blackbox Method for CF and PHP
login  
Current Path:   blackboxsystem.sourceforge.net/file_php.php
    Information about the
    BlackBox Method
 > welcome
 > the method
 > CF blackbox file
 > PHP blackbox file
 > faq
    Contact Info
 > contact
 > join


PHP Blackbox Core File

Download the most recent PHP Blackbox File: blackbox.php and sample app





/* SPECIALIZED FILE FOR USE AT ROOT LEVEL
Revised 1/8/03 by Dan Chick, Byron Bignell.
Ported to PHP 2/22/03 by Lorraine Spiess.
For latest release visit http://sourceforge.net/projects/blackboxsystem/ */

function php_blackbox($tool,$action=NULL) {
   if (empty($tool)) {$tool="";};
   if (empty($action)) {$action="";};

   if (empty($action) && Strchr($tool, ".")) {
      $action = Substr(strstr($tool, "."),1);
      $tool = Substr($tool, 0, strpos($tool,"."));
   }

   if (Strchr($action, ".")){
      $extension = "";
   } else {
      $extension = ".php";
   }

   $dir = "./blackbox/";
   $file = $dir.$tool."/".$action.$extension;
   error_reporting(0); // allows us to customize error message;
   if (file_exists($file)){
      if (!include($file)) {
      echo "Couldn't include ".$file;
      // include("./default.htm");
      }
   } else {
      echo "Couldn't locate ".$file;
      // include("./default.htm");
   }
}



Blackbox Method at Sourceforge:   Visit http://sourceforge.net/projects/blackboxsystem/
Time to generate page = 0.123466 seconds