\

Namespaces

app
startmvc

Classes

autoload StartMVC超轻量级PHP开发框架

Constants

_AND

_AND = 'AND'

_OR

_OR = 'OR'

_STATIC_

_STATIC_ = '/static/'

ACTION

ACTION = $pathInfo[2]

APP_NAMESPACE

APP_NAMESPACE = 'app'

APP_PATH

APP_PATH = \ROOT_PATH . 'app' . \DS

BASE_PATH

BASE_PATH = \dirname($_SERVER['SCRIPT_FILENAME']) . \DS

CACHE_PATH

CACHE_PATH = \ROOT_PATH . 'runtime' . \DS . 'cache' . \DS

CONFIG_PATH

CONFIG_PATH = \ROOT_PATH . 'config' . \DS

CONTROLLER

CONTROLLER = ucfirst($pathInfo[1])

CORE_PATH

CORE_PATH = \ROOT_PATH . 'startmvc' . \DS

DS

DS = \DIRECTORY_SEPARATOR

StartMVC超轻量级PHP开发框架

MODULE

MODULE = $pathInfo[0]

ROOT_PATH

ROOT_PATH = \realpath(__DIR__ . \DS . '..' . \DS) . \DS

SM_UPDATE

SM_UPDATE = '20240321'

SM_VERSION

SM_VERSION = '2.1.5'

START_MEMORY

START_MEMORY = \memory_get_usage()

START_TIME

START_TIME = \microtime(\true)

TEMP_PATH

TEMP_PATH = \ROOT_PATH . 'runtime' . \DS . 'temp' . \DS

VIEW_PATH

VIEW_PATH = APP_PATH . MODULE . DS . 'view'

Functions

config()

config(string  $name = '', string  $value = '', string  $file = 'common') : mixed

配置文件函数

Parameters

string $name
string $value
string $file

Returns

mixed —

cost()

cost() : mixed

时间、内存开销计算

Returns

mixed —

dump()

dump(mixed  $var, string  $label = null, bool  $echo = true) : mixed

格式化变量输出

Parameters

mixed $var
string $label
bool $echo

Returns

mixed —

get_ip()

get_ip() : mixed

获取客户端的真实IP地址

Returns

mixed —

lang()

lang(string  $key, string  $default = '') : string

语言包调用

Parameters

string $key
string $default

(可选) 默认值

Throws

\Exception

Returns

string —

test()

test(string  $para = '') : mixed

自定义函数

Parameters

string $para

The para

Returns

mixed —

url()

url(mixed  $url) : mixed

url的方法

Parameters

mixed $url

Returns

mixed —