Android与php服务器交互

时间:2016-07-27 22:55:23

标签: php android

我遇到与PHP服务器交互的问题。

1 个答案:

答案 0 :(得分:0)

尝试使用Android volley,它既简单又简单,具有很多功能。

Reffer Follow Block它可能对你有帮助..

// a MySQL driver configuration
'development' => array(
'type'           => 'mysqli',
'connection'     => array(
    'hostname'       => 'localhost',
    'port'           => '3306',
    'database'       => 'fuel_db',
    'username'       => 'your_username',
    'password'       => 'y0uR_p@ssW0rd',
    'persistent'     => false,
    'compress'       => false,
),
'identifier'     => '`',
'table_prefix'   => '',
'charset'        => 'utf8',
'enable_cache'   => true,
'profiling'      => false,
'readonly'       => false,
),

// a PDO driver configuration, using PostgreSQL
'production' => array(
'type'           => 'pdo',
'connection'     => array(
    'dsn'            => 'pgsql:host=localhost;dbname=fuel_db',
    'username'       => 'your_username',
    'password'       => 'y0uR_p@ssW0rd',
    'persistent'     => false,
    'compress'       => false,
),
'identifier'     => '"',
'table_prefix'   => '',
'charset'        => 'utf8',
'enable_cache'   => true,
'profiling'      => false,
'readonly'       => array('slave1', 'slave2', 'slave3'),
)