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
即可使用另外有需要云服務器可以了解下創新互聯scvps.cn,海內外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業上云的綜合解決方案,具有“安全穩定、簡單易用、服務可用性高、性價比高”等特點與優勢,專為企業上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。
分享標題:Showdoc搭建項目API文檔系統-創新互聯
URL鏈接:http://www.yijiale78.com/article40/dgspeo.html
成都網站建設公司_創新互聯,為您提供網站制作、靜態網站、網站改版、響應式網站、定制網站、網站建設
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯