Sorry for the basic question here, but I can't find it when I need to, it seems.
If I'm running a script like so:
http://...texis.exe/public/myscript
How can I extract the name of the actual script (in this case, "myscript") from within the page itself? Is there some <sysinfo> function that would allow me to do this? I know there is a way, but I just can't recall.
I need to get the full path to the script. I tried $sourcepath and it seems to give me the relative path to the script from where I executed a script. For example I have a script called testscript in the test directory. If I execute the script from the test dir it diplays:
$ texis testscript
testscript
If I go to the parent directory I get:
$ texis test/testscript
test/testscript
Is there a way to get the full path?
The systyem doesn't return anything when I use PATH_TRANSLATED. Does this have to be used in conjunction with vhttpd. Is it possible to get the full path when executing a script from the command line?
$PATH_TRANSLATED is set by the web server, so a command-line run won't see it. $sourcepath is set by Vortex and is always set, for command-line as well as web server runs, to the path given for the script. However, if you run from the command line and give a current-dir-relative path, $sourcepath will also be current-dir-relative.
To make $sourcepath absolute, you'll need to prepend the current dir if it's not absolute: