phalphp
基于phalcon框架的PHP应用,可用于Restful API,命令行应用及Web应用。, (*1)
A PHP application for APIs,cli,and webapp using the Phalcon framework., (*2)
Requirements
PHP 5.4 or greater, (*3)
Required PHP Modules
- OpenSSL
- Phalcon (http://phalconphp.com/en/download)
- PDO-MySQL, (*4)
To check for those modules is installed/enabled for CLI use, (*5)
$ php -m | egrep "(phalcon|pdo_mysql|openssl)"
phalcon
pdo_mysql
openssl
Database Configuration
Open phalphp/app/config.php
and setup your database connection credentials, (*6)
$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, (*7)
mysql -u root -p your_database_schema < phalphp/mysql.data.sql
Import the tables into your Postgres Server, (*8)
psql -U root -W -f postgres.data.sql your_database_schema
usage:
API, (*9)
CLI, (*10)
Web APP, (*11)