Fatal error: Class 'Phalcon\\Http\\Client\\Request'

匿名 (未验证) 提交于 2019-12-03 01:00:01

问题:

Error on request

Fatal error: Class 'Phalcon\Http\Client\Request' not found in ControllerBase.php on line 41

use Phalcon\Http\Client\Request as CRequest;   $provider = CRequest::getProvider();             $provider->setBaseUri('http://localhost/testing');

回答1:

You will need to a copy of the incubator library files from the Phalcon/Incubator github. Download and copy all or just the HTTP directory to your /app/library/ folder. In your public/index.php, add $loader->registerNamespaces with the correct path to the incubator library.

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

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



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!