我已经按照 zend文档的简单步骤开发了许多简单的控制台操作。
我的动作只有一个文字参数。它工作正常并且执行了该操作,但之前,在每个调用中都会出现以下通知和堆栈跟踪。
我如何删除/解决此消息
Notice: Undefined index: HTTP_ACCEPT_LANGUAGE in C:\xampp\htdocs\pfc_desarrollo\module\SecureDraw\Module.php on line 124
Call Stack:
0.0003 121464 1. {main}() C:\xampp\htdocs\pfc_desarrollo\public\index.php:0
0.0079 237776 2. Zend\Mvc\Application::init() C:\xampp\htdocs\pfc_desarrollo\public\index.php:12
0.1589 1822568 3. Zend\Mvc\Application->bootstrap() C:\xampp\htdocs\pfc_desarrollo\vendor\zendframework\zendframework\library\Zend\Mvc\Application.php:239
0.2135 2232464 4. Zend\EventManager\EventManager->trigger() C:\xampp\htdocs\pfc_desarrollo\vendor\zendframework\zendframework\library\Zend\Mvc\Application.php:142
0.2135 2232584 5. Zend\EventManager\EventManager->triggerListeners() C:\xampp\htdocs\pfc_desarrollo\vendor\zendframework\zendframework\library\Zend\EventManager\EventManager.php:204
0.2350 2387304 6. call_user_func() C:\xampp\htdocs\pfc_desarrollo\vendor\zendframework\zendframework\library\Zend\EventManager\EventManager.php:460
0.2350 2387320 7. SecureDraw\Module->onBootstrap() C:\xampp\htdocs\pfc_desarrollo\vendor\zendframework\zendframework\library\Zend\EventManager\EventManager.php:460
--------------------------------HELLOOOOOO------------------
这是我的动作/路线定义
//module.php
'console' => array(
'router' => array(
'routes' => array(
'hello' => array(
'options' => array(
'route' => 'hello',
'defaults' => array(
'controller' => 'SecureDraw\Controller\Participant',
'action' => 'hello',
),
),
), //Line 124
),
),
),
//Participant.php
public function helloAction(){
return "--------------------------------HELLOOOOOO------------------";
}