Php 当索引在Restler dir之外时,Restler返回404
所以我得到了以下错误Php 当索引在Restler dir之外时,Restler返回404,php,routes,restler,Php,Routes,Restler,所以我得到了以下错误 { "error": { "code": 404, "message": "Not Found" }, "debug": { "source": "Routes.php:354 at route stage", "stages": { "success": [ "get" ], "failure": [ "route", "
{
"error": {
"code": 404,
"message": "Not Found"
},
"debug": {
"source": "Routes.php:354 at route stage",
"stages": {
"success": [
"get"
],
"failure": [
"route",
"negotiate",
"message"
]
}
}
我的项目文件夹是
xampp
->htdocs
-->soa_lab2
--->Restler-master
--->index.php
--->WeatherReport.php
--->dbAccess.php
--->.htaccess
但是,htaccess似乎不起作用
这是我的index.php
<?php
require_once 'Restler-master/vendor/restler.php';
use Luracast\Restler\Restler;
$r = new Restler();
$r->addAPIClass('WeatherReport');
$r->handle();
使用insteadBut的应用程序模板,但我不使用laravel。。还有其他选择吗?可能会改变访问权限吗?由于事实证明我也无法打开示例,同样的错误是@Luracastabove repository几乎没有模板,使用laravel组件的就是其中之一。有关更简单的模板,请参见