我正在运行以下 url 并尝试运行 SimpleAuth.php
http://localhost/restler/public/examples/nof/SimpleAuth.php
它给了
Fatal error: Interface 'Luracast\Restler\iAuthenticate' not found in C:\wamp\www\Restler\public\examples\nof\SimpleAuth.php on line 5
SimpleAuth.php 的内容
use Luracast\Restler\iAuthenticate;
class SimpleAuth implements iAuthenticate
{
const KEY = 'rEsTlEr2';
function __isAllowed()
{
return isset($_GET['key']) && $_GET['key'] == SimpleAuth::KEY ? TRUE : FALSE;
}
function key()
{
return SimpleAuth::KEY;
}
}
iAuthenticate.php
namespace Luracast\Restler;
interface iAuthenticate extends iFilter{ }