PHP and the runtime

The PHP environment your Site runs in, and the helpers it provides.

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

FunctionFileWhat it does
app_db()includes/db.phpOpens the SQLite database.
haume_site_secret(NAME)includes/secrets.phpReads a Secret.
haume_site_url('live')includes/runtime.phpThe Site's Live or Preview address.
haume_contact_submit(...)includes/contact.phpEmails a form submission to the owner.
site_asset(PATH)includes/site.phpLinks 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.