[thelist] PHP includes

Gareth Knight i_am at oneafrikan.com
Fri Oct 19 10:08:04 CDT 2001


Hi there

Greets all ;-)

Since this is my first post - I thought I'd get stuck right in, and ask any
php people for a bitt'o help!

I'm having a problem with parsing PHP includes....
I've designed my site, www.dragflick.com, largely using php includes, which
for static content has worked fine, and I am really happy with the results
so far...:

Like so:
<?php include header file here;?>
static content here
<?php include footer file here; ?>

Being a relative newbie to php, I'm using a few canned scripts to add
functionality and interactivity to my site i.e. vBulletin, chat room, news,
polls, link directory etc... - why re-invent the wheel, right?

To integrate these features into the design, I thought it would be a case of
integrating my header and footer files (as above) into the above scripts'
header and footer code.
So far, I've tried with the news script and the gallery script, and it seems
that although the included header file is parsed, any php include files
which are referenced in the header/footer files are not.  I know this 'cos I
can see the php require code in the html source, if I view source - i.e.:
<?php require('../polls/lc_poll.htm');?> - inside the html blocks used to
define layout.

Now - I'm thinking I'm making a dumb-assed mistake 'cos the include files
are not being parsed somehow - which points to a config or setup
problem..... but I'm open to anyone telling me different ;-)

Has anyone had this before?, is this a problem with a config in the php.ini
file? (my PC [localhost] is a win2k, apache, mysql, php setup), or is this a
problem with the way I've done the code etc..??

Any ideas, comments etc, would be greatly appreciated.
Thanks all
Gareth







More information about the thelist mailing list