yuncopy / yafwap

使用YAF + Medoo 数据库轻量操作 ,适配手机端网页

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

项目部署

server {
    listen  localhost;
    root    /home/wwwroot/;

    location / {
        index  index.php index.html index.htm;
        try_files $uri $uri/ /index.php?$query_string;
    }
    location ~ .php$ {
        fastcgi_split_path_info ^(.+.php)(/.+)$;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_index index.php;
        include fastcgi_params;
    }
    location /api { 
        try_files $uri $uri/ /api.php?$query_string; 
    }
    location /admin {
        try_files $uri $uri/ /admin.php?$query_string; 
    }
    location /upload {
        deny all;
        return 404;
    }
    location ~* \.html$ {
        expires -1;
    }
    location ~* \.(css|js|gif|jpe?g|png)$ {
        expires 1M;
        add_header Pragma public;
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
    }
}

数据库使用

上传文件操作

Redis 缓存

框架外部扩展,请参考

学习YAF框架

备注:内部已经有实例代码。

About

使用YAF + Medoo 数据库轻量操作 ,适配手机端网页

License:MIT License


Languages

Language:PHP 87.1%Language:HTML 12.2%Language:ActionScript 0.7%