On Thu, 31 Jul 2003 17:58:43 -0500, David Gilden wrote:
> $PICTURE_PATH = path_translated();
> $PICTURE_URL = path_info();
> chdir $PICTURE_PATH
>     or die "Couldn't chdir to pictures directory: $!";
Hello David,

        'perldoc CGI', '/path_translated' did return the following information:

        path_translated()
           As per path_info() but returns the additional path
           information translated into a physical path, e.g.
           "/usr/local/etc/httpd/htdocs/additional/stuff".

           The Microsoft IIS is broken with respect to the trans-
           lated path as well.

        This means that everything will be returned INCLUDING the filename of 
your script!!!!
        
        To solve this problem you just might want to delete everything after 
the last slash as in so:

        substr $picture_path, rindex $picture_path, '/';

        More information about the function used can be found by using

                perldoc -f rindex
                perldoc -f substr

        in the terminal/shell.

        BTW. It's also okay to print your variables to the screen or a log 
file, so that you can see what value is actually reached into chdir.

thanks
/oliver/


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to