Simple (but frustrating) Includes problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jchilders_98
Forum Newbie
Posts: 3
Joined: Tue Nov 11, 2003 10:12 am

Simple (but frustrating) Includes problem

Post 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 :)
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

So that is the only code in the page? What's on line 9 or is that it?

Mac
jchilders_98
Forum Newbie
Posts: 3
Joined: Tue Nov 11, 2003 10:12 am

Post by jchilders_98 »

The previous lines are just comments. I'll try to strip out everything except:

<?php
include( "formdb.php");
?>
jchilders_98
Forum Newbie
Posts: 3
Joined: Tue Nov 11, 2003 10:12 am

Post 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!
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

If you want, post the entire script as-it-was before removing the comments. Might help spot what was the issue...
Post Reply