致命错误:类'Phalcon \ Http \ Client \ Request'

时间:2015-07-04 07:29:21

标签: php phalcon

请求时出错

致命错误:第41行的ControllerBase.php中找不到“Phalcon \ Http \ Client \ Request”类

use Phalcon\Http\Client\Request as CRequest;

 $provider = CRequest::getProvider();
            $provider->setBaseUri('http://localhost/testing');

1 个答案:

答案 0 :(得分:0)

您需要从Phalcon/Incubator github获取孵化器库文件的副本。 Download并将所有或仅HTTP目录复制到/ app / library /文件夹。在你的public / index.php中,添加$ loader-> registerNamespaces以及孵化器库的正确路径。

$loader = new Phalcon\Loader();

$loader->registerNamespaces(array(
    'Phalcon' => APP_PATH . 'app/library/'
));

$loader->register();

来源:https://github.com/phalcon/incubator#autoloading-from-the-incubator