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
Share on other sites

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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.