Jump to content

INCLUDE won't work :-(


phppup

Recommended Posts

 

I am having trouble using INCLUDE in my HTML.  I know I've used it before, so I don't understand where my problem is coming from.

 

I created a simple HTML file named ok.htm, it has ONE line that says HI.

 

For testing, I actually added a second line for it to INCLUDE ITSELF: 

<!--#include virtual="ok.htm" -->

 

It didn't work in itself, or any other HTML pages.

 

What am I doing wrong on my local machine?

Link to comment
https://forums.phpfreaks.com/topic/259424-include-wont-work/
Share on other sites

  Quote

Not sure.

 

SO you're saying this ONLY works on the server that I maintain the website on? 

And the machine in my bedroom probably won't recognize it?

 

Whichever server you are using, remove or local, is that server set up for server-side includes? I ask this question because the method you are using is a server-side include method and in order for it to work relies on the server being set up for it.

Link to comment
https://forums.phpfreaks.com/topic/259424-include-wont-work/#findComment-1330222
Share on other sites

Hey Drummin.  Nope, it won't work.

 

I've concluded that the server will NOT run PHP in an HTML file.

(i believe this is one of the reasons I got roped into learning full blown PHP in the first place... LOL)

 

It appears INCLUDES are also suspect.  Although I've seen some articles that blame IntExplorer too.

 

I suppose I'll survive with just PHP files (but I'd have liked to see them as HTML at home, where my PC isn't running PHP.)

Link to comment
https://forums.phpfreaks.com/topic/259424-include-wont-work/#findComment-1330556
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.