准备工作
1:搭建web服务器 nginx + php + sqlite
参考链接:http://blog.csdn.net/xdw1985829/article/details/38919495
注意事项:
配置nginx与php链接的时候
location ~ \.php$ {
# include snippets/fastcgi-php.conf;
#
# # With php5-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/$fastcgi_script_name;
include fastcgi_params;
}
其中 /usr/share/nginx/html/ 为nginx 默认路径
2:编写php页面 以及python脚本
树莓派官方镜像自带python 以及Python GPIO 库