?
Solved

Content types...

Posted on 2003-02-19
5
Medium Priority
?
143 Views
Last Modified: 2013-12-25
I am trying to write a perl script for CGI that will print the output in SHTML format. Unfortunately, text/shtml and text/.shtml do not work, and if I use text/html, it ignores my #exec statements. Any info on this, or perhaps a workaround would be nice, because I need to send info through an SHTML page. Thanks.
0
Comment
Question by:Toraton
3 Comments
 
LVL 2

Accepted Solution

by:
BassTeQ earned 400 total points
ID: 7984700
There's no such thing as a SHTML format, shtml normally means the the page is using SSI, (Server Side Include) statements within the html to create dynamic text/information. This is a server dependant feature. If you're using apache, modify you're httpd.conf to include

#
# To use server-parsed HTML files
#
AddType text/html .shtml
AddHandler server-parsed .shtml

Or if you dont have access to the web servers configuration, then create a file called .htaccess in the same directory as your document and in it add

Options +Includes
AddType text/html .shtml
AddHandler server-parsed .shtml

But since you are using perl/cgi, why dont you just perl code to do what the ssi exec function would do ?

Cheers
0
 
LVL 1

Expert Comment

by:herrmann1001
ID: 7998896
I doubt seriously that the SSI tags will be interpreted/processed by the webserver if you create it "on th fly" from within an perlscript.

I concure with BassTeQ,  why not let perl to the whole work?.
0
 

Author Comment

by:Toraton
ID: 8000735
I would like to make the website easier to maintain and update, so if I have perl arrange the entire page, I must edit that script every single time I add a new page to the site. The way I have it now, I'm using SSI to dynamically create the navigation bar on every page, which makes it so I must edit only one file to maintain the entire site. That's the only reason I'm aiming to do this, but I'll try what you suggested. However, my problem is basically solved, because I learned that SSI accepts the GET method of sending variables, and thus, I just append the QUERY_STRING to the end of any cgi scripts that are used in it. Okay, that's it.
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question