devink Posted February 18, 2003 Share Posted February 18, 2003 I want to create some HTML files to include on my site, for information pages. I would like to do it by stripping an Osc page to the bare bones, and then "include" my external HTML file in the empty space in the middle. I have my Osc template, I simply used shipping.php and removed the little that was in there. The question is, what line of code do I use to "include" my HTML? I am a competent HTML coder, but PHP is new to me. Thanks in advance. Many Thanks, Steve Link to comment Share on other sites More sharing options...
tresseh Posted February 18, 2003 Share Posted February 18, 2003 As far as i know they are pretty much the same function. Out of preference i use require(), however thats just a coding habit i have, and not really through any conscious thought. Found this statement on the web briefly, which might help: "From the PHP documentation, it's more efficient (and predictable) to use the "Require" function to store your page index. <br> <br> "include" is best used with control structures, eg., when using loops or if statements to decide which code to include. " Regards, Jay. Link to comment Share on other sites More sharing options...
robertl Posted February 18, 2003 Share Posted February 18, 2003 include() produces a Warning while require() results in a Fatal Error. Link to comment Share on other sites More sharing options...
devink Posted February 18, 2003 Author Share Posted February 18, 2003 Thanks guys, it's all working nicely. :D Many Thanks, Steve Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.