?
Solved

Content types...

Posted on 2003-02-19
5
Medium Priority
?
142 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
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…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

752 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