pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Frank Bax <fbax@sympatico.ca>
To: pgsql-php@postgresql.org
Subject: Re: PHP function error
Date: Wed, 02 Mar 2005 08:53:26 -0500
Message-ID: <5.2.1.1.0.20050302084822.049cfb60@pop6.sympatico.ca> (raw)
In-Reply-To: <6.1.0.6.0.20050302123253.02422c88@mail.freeshell.org>
References: <422550A0.2040104@sherubtse.edu.bt>
	<OF901127F6.9DA3944D-ON88256FB7.00761864-88256FB7.00767B34@sybex.com>
	<422550A0.2040104@sherubtse.edu.bt>

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.




view thread (5+ messages)  latest in thread

Message-ID: <5.2.1.1.0.20050302084822.049cfb60@pop6.sympatico.ca>
Permalink:  ../5.2.1.1.0.20050302084822.049cfb60@pop6.sympatico.ca/
Also on:    postgresql.org/message-id/5.2.1.1.0.20050302084822.049cfb60@pop6.sympatico.ca

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: fbax@sympatico.ca
  Subject: Re: PHP function error
  In-Reply-To: <5.2.1.1.0.20050302084822.049cfb60@pop6.sympatico.ca>
  References: <422550A0.2040104@sherubtse.edu.bt> <OF901127F6.9DA3944D-ON88256FB7.00761864-88256FB7.00767B34@sybex.com> <5.2.1.1.0.20050302084822.049cfb60@pop6.sympatico.ca>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox