I have put together some php scripts that you may find useful. Since these are not full applications, it is not possible to demonstrate their operation. Such scripts are in the Download section. I have tried to place a reasonable amount of comments in the scripts themselves for ease of understanding. If you like them you can take whatever you want. I shall be glad to receive your feedback in case you find them useful.
Finding the name of the running script to dynamically find the related components to load. Can be used for template driven webpages with menu items stored in files or databases.