我试图建立在一个笨REST API下面这个例子: http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-codeigniter-2/初学者问题笨REST_Controller
但任何事情之前,我要确保我可以调用user_get()函数调用与
http://mysite.com/myApp/index.php/helloworld/user/id/1/format/json
,我想结局会是一个简单的 “user_get称为”
<?php
require("application/libraries/REST_Controller.php");
class Helloworld extends REST_Controller{
function user_get()
{
echo "user_get called";
}
}
?>
但是,我得到这个错误: 遇到了一个错误 无法加载所请求的类:格式
出了什么问题? 谢谢!
感谢它也适用于我 – Ali