JSP Hosting
 

HostingServicesSupportOrderAbout UsSoftwareHome


Even experts read the manuals. Our tech support staff has most of the books that are out on a wide variety of web topics. Here are some of their top picks. We think you'll find them useful and informative as well.



I can't figure out the correct path to my files.

Paths to files uploaded to your account begin with your account's root path. This is as follows

/usr/local/etc/httpd/sites/yourdomain.com/ 

You can determine the rest of the path from the location of your file relative to your root directory. For example, a file called "data.dat" located in your htdocs directory would have a full path as follows:

/usr/local/etc/httpd/sites/yourdomain.com/htdocs/data.dat 

If you will be referencing many files, it is probably easiest to create a variable called $root and assign it the full path to the root directory:

$root = "/usr/local/etc/httpd/sites/yourdomain.com"; 

You can then simply prepend the root path variable to the relative locations of your files throughout your script. For example:

$datafile = "$root/htdocs/data.dat"; 

Unless you need to reference files outside your cgi-bin, we recommend using the shorter and simpler relative paths. Relative paths are always determined based on the location of the required file relative to the location of your script. For example, if you have a cgi-lib.pl library file in a directory called "Library" inside your cgi-bin, the relative path would be:

"./Library/cgi-lib.pl";

 

Back To CGI-Tips

 


Note:
MMA technical support staff cannot provide troubleshooting of problems with third-party CGI scripts including but not limited to: Perl scripts, C/C++ binaries, PHP or web/database integration unless these services are specifically contracted. For these services, please see our Quote Request Form.

      

Copyright © 1995-2012
Motivational Marketing Associates, LLC
All Rights Reserved.