I am trying to learn PERL. I am doing pretty good, but i am a bit stuck.
OK, so i have my apache installed in the directory:
C:\Program Files\Apache Group\Apache2
i have my cgi-bin directory set up in this folder to be my cgi directory. So, my PERL script is supposed to take in (through QUERY_STRING) the name of a folder that sits in the DOCUMENT_ROOT, (like photos, family, kids...etc) in each of those folders are different photos. I want the script to output an html file that has links to all those photos. The script is executed via an href link from the DOCUMENT_ROOT directory (htdocs).
For example, I could have a folder named family in htdocs with 10 family photos and executing the script would give me back an HTML page with links to it. I am doing this so my wife will be able to just drop photos in that folder without having to create links manually.
Anyways, (sorry this is so long), when i create the links they are right if the webpage was being considered from DOCUMENT_ROOT, but it seems the webpage is being looked at from the 'cgi-bin' directory because i always get the 'cannot find /cgi-bin/photos/us.jpg message (where us.jpg is in the photos folder which sits in 'htdocs'). How can i output my path so a script executed from cgi-bin will understand where/how to link to these pictures correctly? thanks!
OK, so i have my apache installed in the directory:
C:\Program Files\Apache Group\Apache2
i have my cgi-bin directory set up in this folder to be my cgi directory. So, my PERL script is supposed to take in (through QUERY_STRING) the name of a folder that sits in the DOCUMENT_ROOT, (like photos, family, kids...etc) in each of those folders are different photos. I want the script to output an html file that has links to all those photos. The script is executed via an href link from the DOCUMENT_ROOT directory (htdocs).
For example, I could have a folder named family in htdocs with 10 family photos and executing the script would give me back an HTML page with links to it. I am doing this so my wife will be able to just drop photos in that folder without having to create links manually.
Anyways, (sorry this is so long), when i create the links they are right if the webpage was being considered from DOCUMENT_ROOT, but it seems the webpage is being looked at from the 'cgi-bin' directory because i always get the 'cannot find /cgi-bin/photos/us.jpg message (where us.jpg is in the photos folder which sits in 'htdocs'). How can i output my path so a script executed from cgi-bin will understand where/how to link to these pictures correctly? thanks!