Skip to content

lyngai/cmp

 
 

Repository files navigation

What is CMP

CMP = Class.Method (Param)

A tiny PHP "framework" that help to build from small console tools to big business website. Official website cmpTech.info

Source Code

https://github.com/cmptech/cmp/tree/master/app_root/webroot/_libs/CMP

Quick Mode for small tool: (cmp-mini-framework-in-one-file \CMP\LibCore)

https://github.com/cmptech/cmp/tree/master/app_root/webroot/_libs/CMP/bootstrap.php

Example:

or

($f='CMP_bootstrap.php')&&class_exists('\CMP\LibCore')||(file_exists($f)||
file_put_contents($f,file_get_contents('https://github.com/cmptech/cmp/raw/master/app_root/webroot/_libs/CMP/bootstrap.php'))
)&&require_once($f);

//to load the class in the folder of current
spl_autoload_register(function($class_name){
	if( defined("_APP_DIR_") && file_exists(_APP_DIR_."/$class_name.php") ){
		require_once _APP_DIR_."/$class_name.php";
	}elseif(file_exists("$class_name.php")){
		require_once "$class_name.php";
	}elseif(file_exists(basename($class_name).".php")){
		require_once basename($class_name).".php";
	}
});

use \CMP\LibCore;

LibCore::println( $_SERVER );

TO build website:

[TINY-WEB-SERVER WITH DOCKER WITH SWOOLE]

git clone https://github.com/cmptech/cmp.git
cd cmp/
sh ./server_start.sh
echo 
echo now use your browser to open http://localhost:9888/

[IN OTHER WEB SERVER]

  • Copy to any web server supports PHP >=5.4
  • Copy "config.switch.override.tmp.example.php" as "config.switch.override.tmp" for switching config-folder.

Examples

TODO

  • BPME integration ( github/cmptech/bpme-php )
  • composer package (cmptech/cmp)

Core Dependency

  • SimpleExcel [0.3.15], for the xls(xml)-php-compilation-for-langpack (NOTES: may be replaced in future) //@link QuickFunc getLang()
  • dzTemplate: a modified mini-php-page-template engine class file //@link QuickFunc include(TPL());

Training (CHN)

https://www.gitbook.com/book/cmptech/cmp-training-book/

https://cmptech.gitbooks.io/cmp-training-book/content/

About

framework from cmptech.info

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 75.0%
  • JavaScript 12.6%
  • CSS 6.7%
  • HTML 5.5%
  • ApacheConf 0.1%
  • Shell 0.1%