hahadu / coole-php
A simple PHP auto loading framework
V0.1.4
2020-09-25 16:45 UTC
Requires
- php: >=7.0
Requires (Dev)
- php: >=7.0
This package is auto-updated.
Last update: 2024-11-09 13:13:06 UTC
README
一个简单的PHP自动加载框架,持续更新中。。。
安装 composer require hahadu/coole-php
新建入口文件index.php
include 'vendor/autoload.php';
新建文件夹 app\controller 打开app\controller目录 新建IndexController.php控制器文件
<?php
namespace controller;
class IndexController{
function index(){
echo 'this is index function';
}
function demo(){
echo 'this is demo function!';
}
}
浏览器访问/index.php?m=index&a=demo
m 控制器名
a 方法名