第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會有你想問的

在 Phalcon 控制器中找不到模型

在 Phalcon 控制器中找不到模型

PHP
冉冉說 2021-08-28 09:13:21
我是 Phalcon 的新手并試圖訪問控制器中的模型,但顯示以下錯(cuò)誤:Fatal error: Uncaught Error: Class 'settings\Settings' not found in C:\xampp\htdocs\icriticize\app\controllers\UserEndController.php:11 Stack trace: #0 [internal function]: UserEndController->homeAction() #1 [internal function]: Phalcon\Dispatcher->callActionMethod(Object(UserEndController), 'homeAction', Array) #2 [internal function]: Phalcon\Dispatcher->dispatch() #3 C:\xampp\htdocs\icriticize\public\index.php(42): Phalcon\Mvc\Application->handle() #4 C:\xampp\htdocs\icriticize\.htrouter.php(30): require_once('C:\\xampp\\htdocs...') #5 {main} thrown in C:\xampp\htdocs\icriticize\app\controllers\UserEndController.php on line 11值得一提的是,我使用 Phalcon-dev-tools 創(chuàng)建了這個(gè)項(xiàng)目,我正在使用 phalcon serve 命令運(yùn)行它。這是控制器:<?phpuse \settings\Settings;class UserEndController extends \Phalcon\Mvc\Controller{    public function homeAction()    {        $settings = Settings::findFirst(1);    }}這是loader.php文件:<?php$loader = new \Phalcon\Loader();/** * We're a registering a set of directories taken from the configuration file */$loader->registerDirs(    [        $config->application->controllersDir,        $config->application->modelsDir    ])->register();這是config.php文件:<?php/* * Modified: prepend directory path of current file, because of this file own different ENV under between Apache and command line. * NOTE: please remove this comment. */defined('BASE_PATH') || define('BASE_PATH', getenv('BASE_PATH') ?: realpath(dirname(__FILE__) . '/../..'));defined('APP_PATH') || define('APP_PATH', BASE_PATH . '/app');return new \Phalcon\Config([    'database' => [        'adapter'     => 'Mysql',        'host'        => 'localhost',        'username'    => 'root',        'password'    => '',        'dbname'      => 'icriticize',        'charset'     => 'utf8',    ],]);
查看完整描述

2 回答

  • 2 回答
  • 0 關(guān)注
  • 242 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號