Przeszukaj pomoc

Unikaj oszustw związanych z pomocą.Nigdy nie będziemy prosić Cię o dzwonienie na numer telefonu, wysyłanie SMS-ów ani o udostępnianie danych osobowych. Zgłoś podejrzaną aktywność, korzystając z opcji „Zgłoś nadużycie”.

Więcej informacji

When I open a file in Firefox, how do I get it to include server side inserts

  • 4 odpowiedzi
  • 2 osoby mają ten problem
  • 1 wyświetlenie
  • Ostatnia odpowiedź od SteveComstock

more options

I like to test my html before putting on my server; I do this by using FireFox / File / Open File and pointing to the file to open; the filenames all end in .shtml, but server side includes are not processed; is this a Firefox issue or a Win XP issue? (Win XP, SP3)

I like to test my html before putting on my server; I do this by using FireFox / File / Open File and pointing to the file to open; the filenames all end in .shtml, but server side includes are not processed; is this a Firefox issue or a Win XP issue? (Win XP, SP3)

Wszystkie odpowiedzi (4)

more options

Web browsers do not process server side includes. That code needs to be processed by the web server or local server that sends the file and the resulting file should have a text/html content type.

more options

Well, I understand the theory pretty well.

But when I ask Firefox to open a file, there is no server! So I figure that Firefox should recognize that and include processing for server side includes.

Or is Windows somehow the server here? That's not clear.

So I guess you just can't do it, eh? :-)

more options

You can't use File > Open File to process server side includes. That will only work if you use File > Open Location and if there is a server that can process the file. If you use File > open File then you open that file directly in Firefox (bypassing a server) and only the HTML code will be processed and not SSI code.

http://encyclopedia.thefreedictionary.com/Server+Side+Include

more options

All I'm saying, then, is that is a feature that could be added to Firefox, along with an option to turn the feature on or off at user specification. It should not be hard for Firefox, on opening a File, to notice that the name ends in .shtml and thus to process any SSI code it finds. That way one could test the appearance of rendered HTML before putting it up on the real server.