PHPRAP,是一个PHP轻量级开源API接口文档管理系统,致力于减少前后端沟通成本,提高团队协作开发效率,打造PHP版的RAP。
版本说明
下载程序到根目录下
[GITEE(推荐)]
git clone https://gitee.com/gouguoyin/phprap.git
[GITHUB]
git clone https://github.com/gouguoyin/phprap.git
[源码]
下载源码,解压后将到phprap目录内所有源码上传到根目录下
设置目录权限
runtime
目录及子目录给予可读可写权限
configs/db.php
文件给予可读可写权限
隐藏入口文件index.php
[IIS]
如果你的服务器环境支持ISAPI_Rewrite的话,可以配置httpd.ini文件,添加下面的内容:
RewriteRule (.*)$ /index\.php\?r=$1 [I]
在IIS的高版本下面可以配置web.Config,在中间添加rewrite节点:
<rewrite><rules><rule name="OrgPage" stopProcessing="true"><match url="^(.*)$" /><conditions logicalGrouping="MatchAll"><add input="{HTTP_HOST}" pattern="^(.*)$" /><add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /><add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /></conditions><action type="Rewrite" url="index.php?r=/{R:1}" /></rule></rules></rewrite>
[Apache]
httpd.conf
配置文件中加载mod_rewrite.so
模块
将AllowOverride None
改为 AllowOverride All
如果是部署在根目录下,在.htaccess
中配置转发规则
<IfModule mod_rewrite.c>RewriteEngine onRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.*)$ index.php?r=/$1 [QSA,PT,L]</IfModule>
如果是部署在二级目录下(假设二级目录是sub_dir),在.htaccess
中配置转发规则
<IfModule mod_rewrite.c>RewriteEngine onRewriteCond %{REQUEST_URI} !^/sub_dir/ RewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.*)$ /sub_dir/index.php?r=/$1 [QSA,PT,L]</IfModule>
[Nginx]
如果是部署在根目录下,在Nginx.conf
中配置转发规则
location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?r=$1 last; break; }}
如果是部署在二级目录下(假设二级目录是sub_dir),在Nginx.conf中配置转发规则
location /sub_dir/ { if (!-e $request_filename){ rewrite ^/sub_dir/(.*)$ /sub_dir/index.php?r=$1 last; }}
打开浏览器,访问域名,会自动跳转到安装界面运行安装程序
安装步骤一:环境检测
安装步骤二:数据库配置
安装步骤三:管理员配置
安装步骤四:安装完成
项目
模块
接口
后台