Previous ION Script User's Guide: Overview of ION Script Next

Where to Store Your Files

This section provides some strategies for locating your .ion, .html, and .pro files.

How HTML Files Are Normally Requested

You're probably used to requesting HTML files using URLs that look like this:

http://www.mydomain.com/index.html  

In this case, the file index.html is located in the Web server's default document directory. On the Apache Web Server, for example, this is called htdocs by default. Files requested via the HTTP protocol must be located in or under the htdocs directory, unless you have changed the Apache server settings (in the httpd.conf file) to include other directories. You could create a subdirectory of htdocs called htmlfiles, and locate your .html files in this directory. The URL to which you would refer would be

http://www.mydomain.com/htmlfiles/index.html  

Often, users request a URL such as

http://www.mydomain.com  

In this case, the Web server will serve a default page, which is specified in the Web server configuration file. If you want your users to be able to access your ION Script application using a URL such as http://www.mydomain.com, you need to define a default page in your Web server configuration file, and use this as the name of your application's starting page.

ION Script Files

The ION Search Path is the path ION Script uses to find files specified using URLs of the following format:

http://myhost.mydomain.com/cgi-bin/ion-p?page=myfile.ion  

Initially, ITT_DIR/idl64/products/ion64/ion_script/examples is the only directory specified for the ION Search Path, but you'll probably want to keep your own source files separate from the example files, so you may wish to create your own directory in which to store ION Script files. For example, you could create a directory called C:\ion (Windows) or /home/ion (UNIX) in which to store your .ion files. Note that this directory must be accessible from your Web server. You would then add this directory to your ION Search Path, which would then look like this:

Windows: C:\Program Files\itt\idl64\products\ion64\ion_script\examples;C:\ion

UNIX: .:/usr/local/itt/ion64/ion_script/examples:/home/ion

Keeping .ion and .html Files in the Same Place

For your ION Script applications, you may wish to keep all your .ion and .html files in the same place. To avoid having to move your HTML files to your Web server's default documents directory, you can load HTML pages using the same URL format as you use to load ION Script pages. For example, if the file myfile.html is located in your ION Search Path rather than the htdocs directory of your Web server, you could load the page using a URL of the following format:

http:///myhost.mydomain.com/cgi-bin/ion-p?page=myfile.html  

See Overview of Fixed Framesets for an example of how the SRC attribute of the <FRAME> tag can also use this type of URL.

If you want to keep your .ion and .html files in the same directory, but also want to use your Web server's default documents directory to store your .html files, you could add the Web server's default documents directory to your ION Search Path.

IDL Files

The IDL Search Path is the path IDL uses to find .pro and .sav files. Initially, \ITT_DIR\idl64\products\ion64\ion_script and its subdirectories are the only directories specified for the IDL Search Path.


Note
By default, the directory \ITT_DIR\idl64\products\ion64\ion_script\examples (Windows) or /ITT_DIR/ion64/ion_script/examples (UNIX) and its subdirectories are automatically searched by IDL. You do not need to add this directory to the IDL Search Path.

However, you may want to keep your own IDL files in another location. For example, you could create a directory called C:\ion\pro (Windows) or /home/ion/pro (UNIX) in which to store your .pro and .sav files. You would then add this directory to your IDL Search Path, which would then look like this:

Windows:
+C:\Program Files\itt\idl64\products\ION63\ion_script\examples;+C:\ion\pro

UNIX:
+/usr/local/itt/ion64/ion_script/examples:
+/home/ion

You can now store all .pro and .sav files in this new directory.

  IDL Online Help (March 06, 2007)