hahadu/coole-php

A simple PHP auto loading framework

Installs: 6

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/hahadu/coole-php

V0.1.4 2020-09-25 16:45 UTC

This package is auto-updated.

Last update: 2025-09-09 15:06:55 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 方法名