我使用的XAMPP有PHP 5.3.1,在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和say.php
<?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
我做错了什么?
发布于 2013-02-23 11:57:13
问题在于PHP版本。从XAMPP到支持PHP5.4的AMPSS及其现在的工作
发布于 2013-02-22 12:12:11
不知道是否有用,但你有没有试着用小写写“说”呢?
localhost/index.php/say
你的密码在我看来不错..。
铜印
发布于 2013-02-23 12:00:19
Restler 3是PHP5.3,函数stream_resolve_include_path将用5.3.2及更高版本定义。
https://stackoverflow.com/questions/15012683
复制相似问题