Showdoc 搭建项目 API 文档系统
生活随笔
收集整理的這篇文章主要介紹了
Showdoc 搭建项目 API 文档系统
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
showdoc 是 PHP 開發的一款 api 文檔系統,因此所需環境和普通 PHP 項目一致
準備環境:
php
nginx
composer //注意更換國內鏡像,否則速度會很慢,甚至失敗
創建項目
composer create-project showdoc/showdoc配置 showdoc 寫權限
chmod a+w showdoc/install chmod a+w showdoc/Sqlite chmod a+w showdoc/Sqlite/showdoc.db.php chmod a+w showdoc/Public/Uploads/ chmod a+w showdoc/Application/Runtime chmod a+w showdoc/server/Application/Runtime chmod a+w showdoc/Application/Common/Conf/config.php chmod a+w showdoc/Application/Home/Conf/config.php配置服務器
下面的配置時windows環境,如果要使用linux ,注意可能需要修改一些配置項 #=== showdoc == server {listen 80;server_name showdoc.leesin.me;charset utf-8;#access_log logs/host.access.log main;root E:\showdoc;index index.php index.html;if (!-e $request_filename) {rewrite ^(.*)$ /index.php?s=/$1 last;break;}#error_page 404 /404.html;# redirect server error pages to the static page /50x.html#error_page 500 502 503 504 /50x.html;location = /50x.html {root html;}location ~ \.php$ {fastcgi_pass fastcgi_backend; # linux無法使用這種方式,而是 127.0.0.1:9000方式fastcgi_index index.php;include fastcgi_params;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;fastcgi_param SCRIPT_NAME $fastcgi_script_name;}}配置 hosts 127.0.0.1 showdoc.leesin.me重啟 nginx 服務開啟sqlite 相關擴展
php.ini extension=php_sqlite3.dll extension=php_pdo_sqlite.dll安裝
瀏覽器輸入: showdoc.leesin.me/install 選擇語言并確定,安裝完成點擊進入首頁訪問使用
http://showdoc.leesin.me/web 即可使用轉載于:https://blog.51cto.com/12750968/2109172
總結
以上是生活随笔為你收集整理的Showdoc 搭建项目 API 文档系统的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: php中update语句修改多个字段,M
- 下一篇: 分布式系统开发工具包 —— 基于Kryo