Re: PHP function error - Mailing list pgsql-php

From Frank Bax
Subject Re: PHP function error
Date
Msg-id 5.2.1.1.0.20050302084822.049cfb60@pop6.sympatico.ca
Whole thread Raw
In response to PHP function error  ("Sarah, Godfrey, Matthew & Vera" <kyedza@sdf.lonestar.org>)
List pgsql-php
At 04:43 AM 3/2/05, Sarah, Godfrey, Matthew & Vera wrote:

>I am trying to run the following code but get the following error:
>
>Fatal error: Call to undefined function show_title() in
>d:\webhost\build\index.php on line 13
>
>
>This file is called "index.php"
>
><? include "dynamic.php"; ?>
><? if (empty($id)) $id = "Home"; ?>
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>< <? show_navigation($id); ?> <? show_content($id); ?>
>The other file "dynamic.php" has the following functions
>
>/* dynamic.inc.php */


Five (at least) problems:

1)  you error message says that error occured on line 13 of index.php, but
the index.php file you show us does not have 13 lines in it.

2) You say the include file is called "dynamic.php", but the first line of
that file has "dynamic.inc.php" - which is it.

3) You should normally use "require" instead of "include" in this situation.

4) I'm guessing you are running with "register_globals" on, which not a
good idea; if it is off, the above code (line wid $id) will not work.

5) These problems have nothing to do with PostgresSQL, so this post is
off-topic.  I suggest you find a php newbie list.


pgsql-php by date:

Previous
From: "Sarah, Godfrey, Matthew & Vera"
Date:
Subject: PHP function error ** SOLVED **
Next
From: "Sarah, Godfrey, Matthew & Vera"
Date:
Subject: Re: PHP function error