PDA

View Full Version : SSI Problem


Roy_Mann
07-01-2003, 08:29 PM
Okay, when I have a file with like some ssi includes in it..and then I call it via ssi into a cgi file to display. The ssi includes inside the file won't show when I view the cgi file. Is there anyway I could get them to show?

kevin
07-01-2003, 08:37 PM
you usually can't use SSI tags on pages that are dynamically created by a script. Most all servers require SSI enabled pages end with .shtm or .shtml

If you are using a script you do not need to use SSI anyway, just have your script open the file (that the SSI tag would have opened) and display it.

Roy_Mann
07-02-2003, 12:13 AM
Okay, it does open the file...but it still won't open the ssi that's inside the file. Because what I'm doing is opening up a header.shtml printing it but still the ssi inside it wont' show...

kevin
07-02-2003, 01:27 AM
How do you open a header.shtml, I don't know what that means.

Are you saying your script writes a file to disk with a .shtml extension but when that file is opened the SSI tag does not work? Can you enter the URL of that file in a browser window and the SSI does work? I am very confused about what it is you are doing.

Roy_Mann
07-02-2003, 04:19 AM
Okay i have two files header.shtml and footer.shtml in an include folder. I have a cgi script superstars.cgi that opens the files and prints the content above and below the cgi content. Inside header.shtml and footer.shtml I have include tags including different files. Now when I run superstars.cgi, header.shtml and footer.shtml show, but the files I have included inside them do not show.

http://www.ewiwrestling.com/include/header.shtml
http://www.ewiwrestling.com/include/header.shtml
http://www.ewiwrestling.com <--what it should look similiar to
http://www.ewiwrestling.com/cgi-bin/superstars.cgi?narcosis

Kevin, I hope that helps.

kevin
07-02-2003, 04:45 AM
That helps. You can not use SSI tags that way, it will not work. And there is no need to use SSI tags like that. Just have the script read the files the SSI tags are supposed to read and print the content of those files to the screen.

.shtml means nothing to your script, it only means something to the server. But the server is not reading the file, the script is, understand? Yes, the script is on the server, but when your script opens the file it is not the same thing as the server opening the file. I repeat: Just have the script read the files the SSI tags are supposed to read and print the content of those files to the screen using the script.

Roy_Mann
07-02-2003, 02:22 PM
Okay, thanks for the help Kevin.