Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Try adding this to your code:
You should see the variables SCRIPT_TRANSLATED and SCRIPT_NAME, which contain the information you need. SCRIPT_NAME is essentially the host absolute URL (minus the scheme, host, and port) for script, and SCRIPT_TRANSLATED is the corresponding physical file. You can extract the path from these, and use that to prefix your "data/file.txt" before opening it.
All great truths begin as blasphemies.
In reply to Re: Can't find relative path
by NetWallah
|
|