亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

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

phalcon框架多模塊程序中 找不到非默認的模塊

phalcon框架多模塊程序中 找不到非默認的模塊

元芳怎么了 2019-04-13 08:37:21
當我訪問http://192.168.0.146/test/顯示的是正常頁面當我訪問http://192.168.0.146/test/manage顯示**Test\Frontend\Controllers\ManageControllerhandlerclasscannotbeloaded**我需要執行Test\Manage\Controllers\IndexController還需要如何處理?項目創建過程如下phalconprojecttestmodules--enable-webtoolsPhalconDevTools(2.0.7)Success:Controller"index"wassuccessfullycreated.Success:Project"test"wassuccessfullycreated.復制app/frontend-》app/manage修改app/manage/controllers下程序的namespace為Test\Manage\Controllers;修改app/manage/Module.php
查看完整描述

2 回答

?
一只萌萌小番薯

TA貢獻1795條經驗 獲得超7個贊

pbulic/index.phprequireDIR.'/../config/routes.php';下面
加上$di->set('router',$router);
usePhalcon\Mvc\Application;
error_reporting(E_ALL);
define('APP_PATH',realpath('..'));
try{
/**
*Readtheconfiguration
*/
$config=includeAPP_PATH."/apps/manage/config/config.php";
/**
*Includeservices
*/
require__DIR__.'/../config/services.php';
/**
*Handletherequest
*/
$application=newApplication($di);
/**
*Includemodules
*/
require__DIR__.'/../config/modules.php';
/**
*Includeroutes
*/
require__DIR__.'/../config/routes.php';
$di->set('router',$router);
echo$application->handle()->getContent();
}catch(Exception$e){
echo$e->getMessage();
}
                            
查看完整回答
反對 回復 2019-04-13
?
慕標琳琳

TA貢獻1830條經驗 獲得超9個贊

題主給的信息不夠,多模塊設置里有幾個比較重要的東西都不給出來,比如:routes.php和各個模塊里的Module.php,這兩個都關系到多模塊的加載。
                            
查看完整回答
反對 回復 2019-04-13
  • 2 回答
  • 0 關注
  • 434 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號