<?
// This function is the PHP version of the TCL proc PRODUCE_MENUBAR which
// will produce the menubar for all PHP files
//
// Syntax: echo PRODUCE_MENUBAR()
//
function PRODUCE_MENUBAR() {
global $HTTP_HOST;
$tcl = (preg_match("/\bdyndns\b/i", $HTTP_HOST)) ? "tclsh83" : "tclsh";
$path = (preg_match("/\bdyndns\b/i", $HTTP_HOST)) ? "cgi-bin" :
"cgi-bin/cgiwrap/ppowell";
$fileID = fopen("http://$HTTP_HOST/$path/menubar.cgi", "r");
$menubar = fread($fileID, 1000000);
fclose($fileID);
return $menubar;
}
?>
This function exists in the file "menubar_functions.php" which is in the
docroot. I have a PHP script in a subfolder /chat that produces a Fatal
Error (call to undefined function PRODUCE_MENUBAR()) each time it tries to
find it.
How do I fix this problem? I do not want to duplicate the PHP script per
folder as there will be an enormous amount of dynamically-created subfolders
and I will have to copy a version per folder. I want to be able to use the
one PHP script in the DOCROOT for every PHP script in every subfolder, how
is this done?
Thanx
Phil
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php