0.19.2 2024-02-05 17:43 UTC

README

Kima PHP 框架

用法

  1. 安装 composer
  2. 执行 "composer create-project stevevega/kima-skeleton [目标路径]"
  3. 将你的 web 服务器指向 [目标路径]/public

示例 nginx 服务器配置

server {
    listen 80;
    server_name [YOUR_DOMAIN];

    root [DESTINATION_PATH]/public;
    index index.html index.htm index.php;

    location / {
        # This is cool because no php is touched for static content
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        # Filter out arbitrary code execution
        location ~ \..*/.*\.php$ {return 404;}

        include fastcgi_params;
        fastcgi_param SERVER_NAME $http_host;
        fastcgi_pass unix:/tmp/php.socket;
    }
}