Re: [Tutor] Automated Breadcrumb -- help for a PHP user
Magnus Lycka
magnus at thinkware.se
Wed Nov 26 14:18:55 EST 2003
> But I'm not sure where to start. How can I pass the URL of the page
> making the include call to the script?
You don't have to pass it in to the script (as a parameter). The script
can simply read the environment variables.
import os
uri=os.environ['REQUEST_URI']
The following CGI script will show all the environment variables that are set:
#!/usr/bin/python -u
import os
print "Content-type: text/plain\n\n"
env_keys = os.environ.keys(); env_keys.sort()
for key in env_keys:
print "%s=%s" % (key, os.environ[key])
--
Magnus Lycka, Thinkware AB
Alvans vag 99, SE-907 50 UMEA, SWEDEN
phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
http://www.thinkware.se/ mailto:magnus at thinkware.se
More information about the Tutor
mailing list