【发布时间】:2014-01-07 21:43:22
【问题描述】:
我有 API http://api.odtu.lu/v1/index.php/users/3 和资源管理器 http://api.odtu.lu/explorer/,我的 index.php 文件如下
require_once '../vendor/restler.php';
ORM::configure('mysql:host=localhost;dbname=thedatabasename');
ORM::configure('username', 'ilhan');
ORM::configure('password', 'password123');
ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));
use Luracast\Restler\Restler;
$r = new Restler();
$r->addAPIClass('Luracast\\Restler\\Resources');
$r->addAPIClass('Users');
$r->handle();
但是我收到此处显示的错误消息http://api.odtu.lu/explorer/
请注意,我对共享主机没有任何管理权限,例如编辑 Apache 配置文件和 SSH。而我的PHP版本是http://api.odtu.lu/phpinfo.php
有一个类似的问题,但通过 httpd.conf 文件Can't find resources.json 解决了我没有编辑该文件的权限。
我不知道在哪里可以找到这个 resources.json 文件。
【问题讨论】: