Saturday 24 September 2011

Is there a way to call an html page from a php file?!!! Please Help!!?

Is there a way (I know there is) to call an html page from a php file?

I've never studied PHP before, so I'm pretty clueless. Hopefully its a one liner.

This is for my forums. Hopefully, this will help stop people who want to see the forums without registering. They wont be able to change the URL to index.php and bypass the password page.



Can anyone gimme a hand here?Is there a way to call an html page from a php file?!!! Please Help!!?require(%26quot;page.html%26quot;);



That line will dump page.html into the current PHP page!



You can also use include(%26quot;page.html%26quot;);



If the file does not exists, include() will not given an error, but require() will.



If you would like to redirect and not place the html file within the php file, you can use the header function. header(%26quot;Location: page.html%26quot;);