1. <strong id="7actg"></strong>
    2. <table id="7actg"></table>

    3. <address id="7actg"></address>
      <address id="7actg"></address>
      1. <object id="7actg"><tt id="7actg"></tt></object>

        Svick Frameworkphp http api 開發(fā)框架

        聯(lián)合創(chuàng)作 · 2023-09-19 05:05

        Svick Framework 是一個(gè)簡單、快速、規(guī)范、靈活、擴(kuò)展性好的 php http api 開發(fā)框架。

        ?? 特點(diǎn)

        • 1、PHP7.2+
        • 2、PSR-4標(biāo)準(zhǔn)自動(dòng)加載
        • 3、輕量級,擴(kuò)展靈活,快速上手
        • 4、支持服務(wù)容器,實(shí)現(xiàn)依賴注入、控制反轉(zhuǎn)
        • 5、支持單應(yīng)用、多應(yīng)用、多版本API
        • 6、多環(huán)境支持,如開發(fā)環(huán)境(dev)測試環(huán)境(test)線上環(huán)境(pro)
        • 7、支持cli模式運(yùn)行
        • 8、ORM鏈?zhǔn)秸{(diào)用,支持?jǐn)?shù)據(jù)庫讀寫分離設(shè)置,可具體到某張表
        • 9、簡單好用的Http客戶端

        ?? 安裝

        首先進(jìn)入您存放項(xiàng)目的目錄,如:cd D:\php

        > composer create-project tomener/svick svick-demo
        
        Do you want to remove the existing VCS (.git, .svn..) history? [Y,n]?
        > Y
        
        > cd svick-demo
        
        > php svick serve
         

        ?? 訪問

        地址1:http://localhost:8090

        地址2:http://your ip:8090

        ?? 文檔

        地址:http://svick.gumaor.com/

        當(dāng)然也可以使用apache、nginx

        apache

        <VirtualHost *:9000>
            ServerAdmin [email protected]
            DocumentRoot "D:\php\svick-demo\public"
            ServerName localhost
            ErrorLog "logs/api.svick-demo.de-error.log"
            CustomLog "logs/api.svick-demo.de-access.log" common
        
            <Directory "D:\php\svick-demo\public">
                Options Indexes FollowSymLinks
                AllowOverride All
                Require all granted
                Header set Access-Control-Allow-Origin *
                Header set Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Token"
            </Directory>
        </VirtualHost>
         

        nginx

        server {
            listen       9000;
            server_name  localhost
        
            charset utf-8;
            access_log off;
        
            root /data/svick-demo/public;
        
            error_page 404 /404.html;
        
            add_header Access-Control-Allow-Origin *;
            add_header Access-Control-Allow-Headers 'Token,Uptoken';
            add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
            add_header Access-Control-Max-Age 86400;
        
            location / {
                if ($request_method = 'OPTIONS') {
                    return 204;
                }
                index index.php index.html;
                if (!-e $request_filename) {
                    rewrite ^/(.*)$ /index.php/$1 last;
                }
            }
        
            location ~ \.php(/|$) {
                fastcgi_split_path_info ^(.+?\.php)(/.*)$;
                fastcgi_pass   unix:/dev/shm/php-fpm.sock;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                fastcgi_param  PATH_INFO        $fastcgi_path_info;
                include        fastcgi_params;
            }
        }

         

        瀏覽 19
        點(diǎn)贊
        評論
        收藏
        分享

        手機(jī)掃一掃分享

        編輯 分享
        舉報(bào)
        評論
        圖片
        表情
        推薦
        點(diǎn)贊
        評論
        收藏
        分享

        手機(jī)掃一掃分享

        編輯 分享
        舉報(bào)
        1. <strong id="7actg"></strong>
        2. <table id="7actg"></table>

        3. <address id="7actg"></address>
          <address id="7actg"></address>
          1. <object id="7actg"><tt id="7actg"></tt></object>
            伸进内裤揉到高潮嗯啊渺渺视频 | 肏屄黄片| 91成人在线免费电影 | 亚洲黄色免费观看 | 日本大尺度激情做爰hd昼颜 | 九色影院| 国产精品嫩苞又嫩又紧又爽AV | 国产黄色A片 | 操屄短片 | www.偷拍自拍 |