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 即可使用
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。