首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Restler 3-设置配置

Restler 3-设置配置
EN

Stack Overflow用户
提问于 2013-02-21 21:36:52
回答 3查看 798关注 0票数 1

我使用的XAMPP有PHP 5.3.1,在htdocs文件夹中有restler结构

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

代码语言:javascript
复制
<?php
require_once 'vendor/restler.php';
use Luracast\Restler\Restler;

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

和say.php

代码语言:javascript
复制
<?php
class Say {

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

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

在浏览器中,我

localhost/index.php/Say

localhost/index.php/Say/hello

它给了我以下信息

致命错误:在第143行调用Luracast\Restler\stream_resolve_include_path()中的未定义函数/Applications/XAMPP/xamppfiles/htdocs/Luracast/Restler/AutoLoader.php

我做错了什么?

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2013-02-23 11:57:13

问题在于PHP版本。从XAMPP到支持PHP5.4的AMPSS及其现在的工作

票数 1
EN

Stack Overflow用户

发布于 2013-02-22 12:12:11

不知道是否有用,但你有没有试着用小写写“说”呢?

localhost/index.php/say

你的密码在我看来不错..。

铜印

票数 0
EN

Stack Overflow用户

发布于 2013-02-23 12:00:19

Restler 3是PHP5.3,函数stream_resolve_include_path将用5.3.2及更高版本定义。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15012683

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档