[nycphp-talk] HELP!!!!
Phil Powell
soazine at erols.com
Sat May 11 02:45:27 EDT 2002
The example still doesn't work for me, though, here is the error:
Fatal error: Call to undefined function: produce_menubar() in
/users/ppowell/web/chat/chat_login.php on line 55
Here is the code of menubar_functions.php:
<?
// 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;
}
?>
and the offending code in /chat/chat_login.php:
<?
flush();
$menubarPath = "http://" . $HTTP_HOST . "/menubar_functions.php";
require_once($menubarPath);
flush();
echo PRODUCE_MENUBAR();
?>
Phil
----- Original Message -----
From: "George Herson" <gherson at snet.net>
To: <soazine at erols.com>
Sent: Friday, May 10, 2002 9:43 PM
Subject: Re: [nycphp-talk] HELP!!!!
> hi.
>
> http://www.php.net/manual/en/function.flush.php has a chat-based example,
fyi.
>
> geo
>
> Phil Powell wrote:
> > I don't know how categorize this one so I'll just shout out a plea for
HELP!!!!!!!!
> >
> > I have the following .php file, menubar_functions.php, resting in the
docroot:
> >
> > <?
> >
> > // 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;
> > }
> >
> > ?>
> >
> > I have a file called chat_login.php that is resting in
$DOCUMENT_ROOT/chat folder.
> >
> > I can't call menubar_function.php 's function PRODUCE_MENUBAR (Fatal
error) from my file chat_login.php.
> >
> > What on earth do I do??!?!
> >
> > Phil
> >
> >
> >
>
>
>
More information about the talk
mailing list