我有一个名为socio的文件夹,并且已将其包含在app / vendorssocio中。如果我分别运行socio / index.php,则其运行成功。我想将其包含在菜单下的cakephp项目中。所以在我的查看文件中,我添加了以下内容
App::import('Vendor', 'socio/index');
但是我运行时出现错误,页面未加载。请帮我解决这个问题。持续2天,我是Cakephp的新手
错误如下
[ErrorException] Undefined variable: params #0 D:\xampp_latest\htdocs\snoogl_shopping\public_html\app\View\Elements\header.ctp(612):
php_error_handler(8,'Undefined varia ...','D:\ xampp_latest ...',612, 阵列)#1 D:\ xampp_latest \ htdocs \ snoogl_shopping \ public_html \ lib \ Cake \ View \ View.php(948): include('D:\ xampp_latest ...')#2 D:\ xampp_latest \ htdocs \ snoogl_shopping \ public_html \ lib \ Cake \ View \ View.php(910): 查看-> _ evaluate('D:\ xampp_latest ...',数组)#3 D:\ xampp_latest \ htdocs \ snoogl_shopping \ public_html \ lib \ Cake \ View \ View.php(1213): 查看-> _ render('D:\ xampp_latest ...',数组)#4 D:\ xampp_latest \ htdocs \ snoogl_shopping \ public_html \ lib \ Cake \ View \ View.php(418): 查看-> _ renderElement('D:\ xampp_latest ...',数组,数组)#5 D:\ xampp_latest \ htdocs \ snoogl_shopping \ public_html \ app \ View \ Layouts \ error.ctp(353): 查看-> element('header')#6 D:\ xampp_latest \ htdocs \ snoogl_shopping \ public_html \ lib \ Cake \ View \ View.php(948): include('D:\ xampp_latest ...')#7 D:\ xampp_latest \ htdocs \ snoogl_shopping \ public_html \ lib \ Cake \ View \ View.php(910): 查看-> _ evaluate('D:\ xampp_latest ...',数组)#8 D:\ xampp_latest \ htdocs \ snoogl_shopping \ public_html \ lib \ Cake \ View \ View.php(542): 查看-> _ render('D:\ xampp_latest ...')#9 D:\ xampp_latest \ htdocs \ snoogl_shopping \ public_html \ lib \ Cake \ View \ View.php(479): 查看-> renderLayout('','错误')#10 D:\ xampp_latest \ htdocs \ snoogl_shopping \ public_html \ lib \ Cake \ Error \ ExceptionRenderer.php(308): 查看-> render('error500','error')#11 D:\ xampp_latest \ htdocs \ snoogl_shopping \ public_html \ lib \ Cake \ Error \ ExceptionRenderer.php(289): ExceptionRenderer-> _ outputMessageSafe('error500')#12 D:\ xampp_latest \ htdocs \ snoogl_shopping \ public_html \ lib \ Cake \ Error \ ExceptionRenderer.php(199): ExceptionRenderer-> _ outputMessage('fatalError')#13 [内部 函数]:ExceptionRenderer-> _ cakeError(Object(FatalErrorException))
14 D:\ xampp_latest \ htdocs \ snoogl_shopping \ public_html \ lib \ Cake \ Error \ ExceptionRenderer.php(176):
call_user_func_array(Array,Array)#15 D:\ xampp_latest \ htdocs \ snoogl_shopping \ public_html \ lib \ Cake \ Error \ ErrorHandler.php(120): ExceptionRenderer-> render()#16 [内部函数]: ErrorHandler :: handleException(Object(FatalErrorException))#17 D:\ xampp_latest \ htdocs \ snoogl_shopping \ public_html \ lib \ Cake \ Error \ ErrorHandler.php(252): call_user_func('ErrorHandler :: h ...',Object(FatalErrorException))#18 D:\ xampp_latest \ htdocs \ snoogl_shopping \ public_html \ lib \ Cake \ Error \ ErrorHandler.php(203): ErrorHandler :: handleFatalError(64,'无法重新声明...', 'D:\ xampp_latest ...',6)#19 [内部功能]: ErrorHandler :: handleError(64,'无法重新声明...', 'D:\ xampp_latest ...',6,数组)#20 D:\ xampp_latest \ htdocs \ snoogl_shopping \ public_html \ lib \ Cake \ Core \ App.php(929):call_user_func('ErrorHandler :: h ...',64,'无法重新声明...', 'D:\ xampp_latest ...',6,数组)#21 D:\ xampp_latest \ htdocs \ snoogl_shopping \ public_html \ lib \ Cake \ Core \ App.php(902):App :: _ checkFatalError()#22 [内部功能]:App :: shutdown()#23 {main}