简体   繁体   English

致命错误:“ Phalcon \\ Http \\ Client \\ Request”类

[英]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.

相关问题 PHP - Phalcon致命错误:未捕获的错误:未在其中找到类“Phalcon\\Db” - PHP - Phalcon <b>Fatal error</b>: Uncaught Error: Class 'Phalcon\Db' not found in Phalcon 致命错误:Class 找不到“Phalcon\Mvc\Application” - Phalcon Fatal error: Class 'Phalcon\Mvc\Application' not found in 致命错误:未捕获错误:Class 未找到“Phalcon\Config” - Fatal error: Uncaught Error: Class 'Phalcon\Config' not found 致命错误:未捕获错误:Class 在 Phalcon Php 应用程序中找不到“Phalcon\Config” - Fatal error: Uncaught Error: Class "Phalcon\Config" not found in Phalcon Php application 致命错误:Class 'Guzzle\Http\Client' 在 Laravel 中找不到,即使安装了 Guzzle - Fatal Error : Class 'Guzzle\Http\Client' not found in Laravel Even after Guzzle installed 带有phalcon 3.3的pthreads-PHP致命错误 - pthreads with phalcon 3.3 - PHP Fatal error 致命错误:找不到“Mosquitto\\Client”类 - Fatal error: Class 'Mosquitto\Client' not found 找不到Phalcon Mongo类错误 - Phalcon Mongo Class not found error Phalcon:名称空间类声明错误 - Phalcon: namespace class declaration error 使用Oauth2.0身份验证和适用于PHP的Google Contact API时出现“致命错误:未找到类&#39;Google_Http_Request&#39; - “Fatal error: Class 'Google_Http_Request' not found in” while using Oauth2.0 authentication and Google Contact API for PHP
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM