[英]Fatal error: Class 'Phalcon\Http\Client\Request'
Error on request 错误要求
Fatal error: Class 'Phalcon\\Http\\Client\\Request' not found in ControllerBase.php on line 41 致命错误:在第41行的ControllerBase.php中找不到类'Phalcon \\ Http \\ Client \\ Request'
use Phalcon\Http\Client\Request as CRequest;
$provider = CRequest::getProvider();
$provider->setBaseUri('http://localhost/testing');
You will need to a copy of the incubator library files from the Phalcon/Incubator github. 您需要从Phalcon / Incubator github获得孵化器库文件的副本。 Download and copy all or just the HTTP directory to your /app/library/ folder. 下载全部或仅HTTP目录并将其复制到您的/ app / library /文件夹中。 In your public/index.php, add $loader->registerNamespaces with the correct path to the incubator library. 在您的public / index.php中,将$ loader-> registerNamespaces添加到孵化器库的正确路径。
$loader = new Phalcon\Loader();
$loader->registerNamespaces(array(
'Phalcon' => APP_PATH . 'app/library/'
));
$loader->register();
Source: https://github.com/phalcon/incubator#autoloading-from-the-incubator 来源: https : //github.com/phalcon/incubator#autoloading-from-the-incubator
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.