标签:
PHP建立HTTP+SQLite服务器: php -S 0.0.0.0:80 -t /www 提供HTTP+JSON服务: $db = new mysqli(‘127.0.0.1‘,‘user‘,‘pass‘,‘dbname‘,3306); header(‘Content-Type: application/json; charset=utf-8‘); echo json_encode($db->query(‘SELECT * FROM posts WHERE id=‘.intval($_GET[‘id‘]))->fetch_all());
标签:
原文地址:http://www.cnblogs.com/hualiu0/p/5731646.html