w3yyb/phalphp

phalphp

v2.0 2016-11-23 10:42 UTC

This package is not auto-updated.

Last update: 2024-04-20 03:21:02 UTC


README

v2.0

基于phalcon框架的PHP应用,可用于Restful API,命令行应用及Web应用。 支持分模块,支持访问权限控制,行为日志记录

A PHP application for APIs,cli,and webapp using the Phalcon framework.

Requirements

PHP 5.4 or greater

Required PHP Modules

To check for those modules is installed/enabled for CLI use

$ php -m | egrep "(phalcon|pdo_mysql|openssl)"
phalcon
pdo_mysql
openssl

Database Configuration

Open phalphp/app/config.php and setup your database connection credentials

$settings = array(
        'database' => array(
                'adapter' => 'Mysql', /* Possible Values: Mysql, Postgres, Sqlite */
                'host' => 'your_ip_or_hostname',
                'username' => 'your_username',
                'password' => 'your_password',
                'name' => 'your_database_schema',
                'port' => 3306
        ),
);

Import the tables into your mysql database

mysql -u root -p your_database_schema < phalphp/mysql.data.sql

Import the tables into your Postgres Server

psql -U root -W -f postgres.data.sql your_database_schema

usage:

API

CLI

Web APP