See exactly what's available
hm runtime
This asks your Site's PHP for its version, extensions and limits. It's always current, so check it rather than guessing.
Helpers in every new Site
| Function | File | What it does |
|---|---|---|
app_db() | includes/db.php | Opens the SQLite database. |
haume_site_secret(NAME) | includes/secrets.php | Reads a Secret. |
haume_site_url('live') | includes/runtime.php | The Site's Live or Preview address. |
haume_contact_submit(...) | includes/contact.php | Emails a form submission to the owner. |
site_asset(PATH) | includes/site.php | Links CSS and JS so browsers don't keep old copies. |
Each file's header comment explains how to use it.
Where data lives
Databases are under HAUME_STORAGE_ROOT, for example getenv('HAUME_STORAGE_ROOT') . '/db/app.sqlite'. Preview and Live have separate copies.
Live and Preview are separate
Live and Preview run as separate PHP services, with separate data and secrets. Logs are labelled with which one wrote them.