Useful pre-defined variables for working with Midgard
Submitted by jamesg on 30 August, 2003 - 04:13.
When I called the following page:
http://test.wilderness.org.au:8001/tws/test_paths/extra/?hi=there
The actual Midgard page being called is test_paths
The following variables are available to you:
| $midgard->uri | /tws/test_paths/extra/ |
| $SCRIPT_NAME | /tws/test_paths/extra/ |
| $PHP_SELF | /tws/test_paths/extra/ |
| $midgard->self | /tws/test_paths/ |
| $midgard->prefix | /tws |
| $HTTP_HOST | test.wilderness.org.au:8001 |
| $REQUEST_URI | /tws/test_paths/extra/?hi=there |
| $argv[0] | extra |
| $QUERY_STRING | hi=there |
If you're using Nemein Navbar, the code-init will provide you with the following extras:
| $site["uri"] | /tws/ |
| $site["url"] | http://test.wilderness.org.au:8001/tws/ |
| $protocol | http:// |
Getting these variables under control will make life much easier.
» login to post comments
