[San-Diego-pm] Operating on files over there

Joel Fentin joel at fentin.com
Fri Sep 24 12:55:32 CDT 2004


Brick Robbins wrote:

> Perl used the filesystem the path name, which is not the same as the
> URL, since the path to the webserver root URL is not the same as the
> filesystem root.
> 
> If the perl script is being run as a CGI, then this should work
> 
> rename("$ENV{'DOCUMENT_ROOT'}/cgi-bin/temp.txt","$ENV{'DOCUMENT_ROOT'}/cgi-bin/temp.old");

I assume $ENV{'DOCUMENT_ROOT'} is for xxx.com where the perl script is, 
and not for yyy.com where I want to do my work.

-- 
Joel Fentin    tel: 760-749-8863    FAX: 760-749-8864
Contact me:    http://fentin.com/me/ContactMe.html
Biz:           http://fentin.com
Personal:      http://fentin.com/me/


More information about the San-Diego-pm mailing list