Skip to content
Simple, easy to use, full functionality of the PHP framework.
PHP JavaScript TypeScript CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ctr
data
doc
etc
lib
log
mod
stc-ts
stc
sys
view/__Mutton__
.gitignore
.htaccess
LICENSE
README.md
index.php

README.md

Mutton

License GitHub issues GitHub Releases GitHub Pre-Releases

Simple, easy to use, full functionality of the PHP framework.

Languages

简体中文 | 繁體中文

Installation

Download the latest release and put it to directory, then to start development.

Environment

PHP 7.2+
Nginx/Apache

Note: Under Nginx, you need to manually configure the rewrite rule with the following rewrite rules:

if ($request_uri !~ ^/(stc/.*|favicon.\w+?\??.*|apple[\w-]+?\.png\??.*|[\w-]+?\.txt\??.*)$) {
    rewrite ^/([\s\S]*)$ /index.php?__uri=$1 last;
}

Library

Captcha, Crypto, Db (MySQL, Sqlite), Kv (Memcached, Redis, RedisSimulator), Net, Session, Sql, Text.

Features

No brains

Based on the idea of not using the brain, the commonly used and uniform style of the library has been encapsulated.

Library auto load

You can use the library directly without having to manually include them.

UI Console

A console that contains a UI interface that automatically pairs the latest version of Mutton to detect which files have been modified or need to be upgraded.

Net Library contains full Cookie implementation

Cookies can be obtained directly as an array of variables, which can exist anywhere, such as databases, memory, and so on.

Perfect filter

Reasonable use of filters, you can quickly filter database entries.

China Library Support

For WeChat payment, WeChat login, Alibaba Cloud OSS, Tencent Cloud COS, Alipay payment (forthcoming support) has been completed package.

And more...

Demonstrate

Generate 16-bit random numbers

$str = $this->_random(16, Ctr::RANDOM_N);

Generate a verification code picture

Captcha::get(400, 100)->getStream();

Get a list from the database

$userList = User::where([
    ['state', '!=', '0'],
    'type' => ['1', '2', '3'],
    'is_lock' => '0'
])->all();

Note: All database operations are secure in this framework.

Other demos

You can download and view the home Code (ctr/test.php) to see more examples.

Changelog

Changelog

License

This library is published under Apache-2.0 license.

Name meaning

Sheep are so cute.

You can’t perform that action at this time.