Php Restler 3-设置配置

Php Restler 3-设置配置,php,xampp,restler,Php,Xampp,Restler,我正在使用PHP5.3.1的XAMPP,它在htdocs文件夹中具有restler结构 在我的htdocs文件夹中,有index.php <?php require_once 'vendor/restler.php'; use Luracast\Restler\Restler; $r = new Restler(); $r->addAPIClass('Say'); // repeat for more $r->handle(); //serve the response 不

我正在使用PHP5.3.1的XAMPP,它在htdocs文件夹中具有restler结构

在我的htdocs文件夹中,有index.php

<?php
require_once 'vendor/restler.php';
use Luracast\Restler\Restler;

$r = new Restler();
$r->addAPIClass('Say'); // repeat for more
$r->handle(); //serve the response

不知道这是否有帮助,但您尝试过吗
用小写字母写或者说

localhost/index.php/say

你的代码对我来说很好

特写
Inge

不知道它是否有用,但你试过吗 用小写字母写或者说

localhost/index.php/say

你的代码对我来说很好

特写
Inge

问题在于PHP版本。从XAMPP改为支持PHP5.4的AMPS,它现在可以工作了,问题在于PHP版本。从XAMPP更改为支持PHP5.4的AMPS,它现在的工作方式是PHP5.3,函数
stream_resolve_include_path
将在5.3.2及更高版本中定义。

Restler 3是PHP5.3,函数
stream_resolve_include_path
将在5.3.2及更高版本中定义稍后。

stream\u resolve\u include\u路径仅在PHP5.3.2上可用,但restler应在5.3及以上版本上使用。我们会解决的。同时,您可以尝试升级PHP,看看它是否有效吗?你可以跟着做这个把戏的人走。已更改为支持PHP5.4的AMPS,并且finestream_resolve_include_path仅在PHP5.3.2上可用,但restler应在5.3及以上版本上工作。我们会解决的。同时,您可以尝试升级PHP,看看它是否有效吗?你可以跟着做这个把戏的人走。改为支持PHP5.4的AMPS,运行良好
<?php
class Say {

    /*
    * @url GET /
    */
    function hello($to='world') {
        return "Hello $to!";
    }

    function hi($to) {
        return  "Hi $to!";
    }
}