用tp5.0做后端,phpstudy 小皮面版设置好后。浏览器运行http://vuethink.cc/admin/base/getConfig,打开后出现
No input file specified
网上找方法。。。
官网方法如下,没有解决
[ Apache ]
- httpd.conf配置文件中加载了mod_rewrite.so模块
- AllowOverride None 将None改为 All
- 把下面的内容保存为.htaccess文件放到应用入口文件的同级目录下
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
最后发现是因为不能正确识别path_info造成的,
解决方法就是在 public目录下修改 ".htaccess"文件,如下。添加一个问号。
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>
不会出现No input file specified错误,但是也加载不出数据。一直显示的是:vuethink接口
接着看下vue的请求。
发现通过Vue可以,http://localhost:8080/可以加载数据,真是奇怪。
请求:http://vuethink.cc/admin/base/getConfigs,以下是返回结果
{"code":200,"data":{"SYSTEM_NAME":"VueThink通用后台登录","SYSTEM_LOGO":"uploads\\20170219\\d9fe7b784e1b1f406234b7b301e627e8.png","LOGIN_SESSION_VALID":"1644","IDENTIFYING_CODE":"0"},"error":""}
既然能打开了后台数据那先做业务吧。这个问题以后再研究