Documentation

Documentation

Table of Contents

Packages

Lwt

Namespaces

Lwt

Functions

url()  : string
Generate a URL with the application base path prepended.
base_path()  : string
Get the configured application base path.

Functions

url()

Generate a URL with the application base path prepended.

url([string $path = '/' ]) : string

Use this for all internal links to ensure they work correctly when the application is installed in a subdirectory.

Parameters
$path : string = '/'

The path to generate URL for (should start with /)

Tags
example

url('/login') returns '/lwt/login' if APP_BASE_PATH=/lwt

example

url('/') returns '/lwt' if APP_BASE_PATH=/lwt

example

url('/assets/css/main.css') returns '/lwt/assets/css/main.css'

Return values
string

The full URL path with base path prepended

base_path()

Get the configured application base path.

base_path() : string
Return values
string

The base path (e.g., '/lwt') or empty string for root

Search results