Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Simple question?
May 25, 2005, 11:49 am
rate this thread
I would like to include HTML code generated through a PHP script. The
reason why I try to do this is because the HTML file depends on a model
that I keep updating (using GoLive).
I tried to use the following piece of code:
<p>The database contains <object type="text/html"
Where am I wrong?
Re: Simple question?
What's not working? include() is for including files, such as PHP
files. Although a little needless overhead exists when include()ing
plain text (like HTML) it still will work fine. Then again, "not work"
isn't an official PHP error or easy to decipher so we have no idea what
your problem is ;-)
Anyway, read http://php.net/include for details on using include (or
simply use readfile() to output the HTML files).
And realize that this must be parsed so I'm not sure how golive works
or is setup but somehow PHP needs to be initiated, like through the web