LAMP++ PHP App Code LayoutBefore considering PHP code, examine format of browser URL.
This URL is more than an address that points to a single page.
It both points to index.php and configures it with parameter p to grab desired module page contents.
This URL is in format: [base url]/[page]?[variable]=[value]
- Base URL = 'urbanspectra.com/...'
- Sole Point of Site User Entry = 'index.php'
- URL Parameter = p
- Value = layout
Mouseover links that you see across this page.
Look at URLs across site in Status Bar at bottom-left of browser window.
All site URLs follow this same format.
After reviewing this page in full, look at some NAKED php code!
Four Most Crucial PHP Scripts Marked Below*
DIR OR FILE DESCRIPTION ----------- ----------- images/ Image files used across site. includes/ Common files for minimizing redundant code across site. | * |- config.inc.php App config file, NOT stored in production webroots! |- footer.inc.php Appears at bottom of every page |- header.inc.php Appears at top of every page * |- main_nav.inc.php |- right_sidebar.inc.php |- style.css Styles (appearance) across site are controlled in single css file *index.php File read first from site root dir without being explicitly requested. This index file supports sole secure point-of-entry to load module content into browser. *modules/ All modules live in here. We can extend site easily by adding module page + index.php parameter settings + nav code. naked_php/ Copies of each php file to be optionally viewed as naked php code. scripts/ These are tools that help us to manage this site. To upload and distribute code that you will write, use these tools.