dev-master
9999999-dev https://www.kcloze.comA simple PHP framework for api or cli application
MIT
The Requires
- php >=5.3.0
The Development Requires
- php >=5.3.0
api cli microframework
Wallogit.com
2017 © Pedro Peláez
A simple PHP framework for api or cli application
run in php-fpm: Open your browser and enter http://youhost/index.php?ycf=hello&act=hello, (*1)
if set nginx as follow,url can be simple: http://youhost/hello/hello, (*2)
location / {
if (!-e $request_filename){
rewrite ^/(.*) /index.php last;
}
}
run with swoole:
* php env in you path
* chmod u+x server.sh
* ./server.sh, (*3)
public function actionTask()
{
// send a task to task worker.
$param = array(
'action' => 'test',
'time' => time(),
);
//var_dump(HttpServer::getInstance()->http);
//$this->http->task(json_encode($param));
for ($i = 0; $i < 1; $i++) {
$taskId = YcfCore::$_http_server->task(json_encode($param));
}
echo $taskId . " hello ycf" . time();
}
benchmarks, (*4)
mail: pei.greet@gmail.com qq群: 141059677, (*5)
The ycf framework is open-sourced software licensed under the MIT license, (*6)
A simple PHP framework for api or cli application
MIT
api cli microframework