当索引位于restler目录之外时,Restler返回404

时间:2016-05-23 15:39:17

标签: php routes restler

所以我收到以下错误

{
"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();

我使用来自restler示例的标准.htaccess

我该怎么办? 请帮忙..谢谢

0 个答案:

没有答案