一个用C编写的PHP框架,具有简单,快速,标准,安全的特性

网友投稿 632 2022-11-05

一个用C编写的PHP框架,具有简单,快速,标准,安全的特性

一个用C编写的PHP框架,具有简单,快速,标准,安全的特性

Asf - API Services Framework

Simple, High performance PHP framework written in C.

Introduction

API Services Framework (or simply Asf). It's has many micro-innovation and is a new generation of lightweight MVC framework.

Features

The class provided by the framework, loaded when the PHP process starts, and resident in memory.Errno = 999, PHP fatal error interception.Strong early warning mechanism (DB, Cache, Script, PHP Error).Support for Logger Buffer CacheSupport for GPC methods, making it easier to use PHP global variables ($_GET, $_POST, $_COOKIE)Support for configuration file resident memorySupport for faster, easier-to-operate cookie management

Install

Requirements

PHP 7.0 +GCC 4.4.0+ (Recommended GCC 4.8+)

DownLoad

git clone https://github.com/yulonghu/asf.git

Compile for Linux/Unix/Mac

Provide two installation methods. Select No.1, Use the following methods to install the extension:

cd asf/travissudo ./install -i /path/to/phpize -c /path/to/php-config

Select No.2, PHP extension standard installation:

cd asf/asf/path/to/phpize./configure --with-php-config=/path/to/php-configmake && make install

Add the extension to your php.ini

extension=asf.so

Restart the web server

Documentation

http://box3-/phpasf/index.html

Get Started

Use tools to create a new project

/php-bin-path/php asf-src/tools/asf_project.php /to-path/project_name

Layout

+ public | - index.php+ config | - config.php+ library+ modules | - Bootstrap.php | - Constants.php + api |+ services |- Index.php // Default service |+ logics |+ daos

config/config.php

array( 'root_path' => APP_PATH . '/modules', ));return $configs;

public/index.php

run();

Default service

Run in Nginx/Apache/Lighttpd

http://your-domain.com

Output results

{ "errno": 0, "data": "Hello World"}

License

Asf is open source software under the PHP License v3.01

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:jvm原理之SystemGC源码分析
下一篇:xy-ui是一套使用原生Web Components规范开发的跨框架UI组件库
相关文章

 发表评论

暂时没有评论,来抢沙发吧~