Page 1 of 1

Simple (but frustrating) Includes problem

Posted: Tue Nov 11, 2003 10:12 am
by jchilders_98
I'm having a head-banging problem with a very simple construct:

I have a script that says (only):

include("formdb.php");

And even though the file exists, I get this error:

Fatal error: Call to undefined function: () in C:\Program Files\Apache Group\Apache2\htdocs\dbForm\test2.php on line 9

It doesn't matter if I change the include name. I get the same error whether the include file exists or not.

Can somebody tell me what (duh!) I am missing please??

Thx :)

Posted: Tue Nov 11, 2003 10:17 am
by twigletmac
So that is the only code in the page? What's on line 9 or is that it?

Mac

Posted: Tue Nov 11, 2003 10:22 am
by jchilders_98
The previous lines are just comments. I'll try to strip out everything except:

<?php
include( "formdb.php");
?>

Posted: Tue Nov 11, 2003 10:23 am
by jchilders_98
Ok, now that worked. Dangit. Why should the comments have affected it? Hmm... well I'll play around with this some more.

Thanks, you got me past my block!

Posted: Tue Nov 11, 2003 10:39 am
by JAM
If you want, post the entire script as-it-was before removing the comments. Might help spot what was the issue...