With CGI scripts, you can perform a variety of useful functions with your Personal Webspace. This guide explains the specific actions that you need to take to use CGI scripts with your Personal Webspace account. This document is not a tutorial on writing CGI scripts or programming in any language. CGI scripts can be stored anywhere within your .web subdirectory of your home directory. They must end with a .cgi or a .pl extension in order to work properly. You can use your FTP client software to make the necessary changes to file permissions (CHMOD). For assistance in using CHMOD, see if your client is listed here Writing to Files The web server is set up to execute scripts with your username, making the .web directory writable in all areas. There is nothing you need to do to enable this functionality as it is part of the server. Scripting Languages CGI scripts must (by definition) be written in some kind of scripting language. You can choose which scripting language to use by modifying the first line of your script. The first line of your script must be the characters "#!" followed by the full pathname of the scripting language interpreter. Several scripting languages are available for use in CGI scripts:
PERL- version: 5.6.0 path: /usr/local/bin/perl Paths to Programs When writing your CGI scripts, you may need to know the direct path to certain programs on the Web Server. Here are some of the most common:
DATE- path: /usr/bin/date Server Side Includes There are a number of other neat tricks that can be done using server-side includes, which is how the access counter is done. With a little bit of programming (sorry, no ready-made solution is available at this time) you should be able to keep track of where requests are coming from. Keep in mind that in the past files using the .html file extension were acceptable for web pages using SSI. This is no longer the case. The filename MUST end in .php in order to use server side includes |
All text and original graphics copyright ©1993-2017 MMCTSU All Rights Reserved. |