PHP code example of zhamao / framework

1. Go to this page and download the library: Download zhamao/framework library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zhamao / framework example snippets


#[\BotCommand('你好')]
public function hello(\BotContext $ctx) {
  $ctx->reply("你好,我是炸毛!"); // 简单的命令式回复
}
#[\Route('/index')]
public function index() {
  return "<h1>hello!</h1>"; // 快速的 HTTP 服务开发
}
bash
# Linux、macOS 下一键检测 PHP 环境、安装框架
bash <(curl -fsSL https://zhamao.xin/v3.sh)

# 启动框架
cd zhamao-v3
./zhamao server