0
私はmodule.config.phpの私の子ルートに問題があります。私は、メインルートが子ルートを受け入れることができます(私は前にこれをやったし、この問題を持っていたことはなかった)が、私はこのエラーを取得しています何らかの理由でどこに設定されていますZend Framework 2 Tree Route Stack Error
PHP Warning: explode() expects parameter 2 to be string, array given in C:\\xampp\\htdocs\\vendor\\zendframework\\zend-mvc\\src\\Router\\Http\\TreeRouteStack.php on line 313
私はそれを上に見てきました何度も繰り返しますが、私はこれを引き起こしているかもしれません。ここでmodule.config.phpでのルーティングのための私のコードは、私は、これは十分な情報がない場合に謝罪
'router' => array(
'routes' => array(
'home' => array(
'type' => 'Zend\Mvc\Router\Http\Literal',
'options' => array(
'route' => '/',
'defaults' => array(
'controller' => 'Application\Controller\Index',
'action' => 'index',
),
),
'may_terminate' => true,
'child_routes' => array(
'default' => array(
'type' => 'Segment',
'options' => array(
'route' => '/[:controller[/:action]]',
'constraints' => array(
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
),
'defaults' => array(
),
),
),
'setup' => array(
'type' => 'Segment',
'options' => array(
'route' => 'setup[/:action]',
'defaults' => array(
'controller' => 'Application\Controller\Setup',
'action' => 'index',
),
),
),
'admin-login' => array(
'type' => 'Segment',
'options' => array(
'route' => 'admin-login[/:action]',
'defaults' => array(
'controller' => 'Application\Controller\AdminLogin',
'action' => 'index',
),
),
),
'member-login' => array(
'type' => 'Segment',
'options' => array(
'route' => 'member-login[/:action]',
'defaults' => array(
'controller' => 'Application\Controller\MemberLogin',
'action' => 'index',
),
),
),
'logout' => array(
'type' => 'Literal',
'options' => array(
'route' => 'logout',
'defaults' => array(
'controller' => 'Application\Controller\Logout',
'action' => 'index',
),
),
),
'register' => array(
'type' => 'Segment',
'options' => array(
'route' => 'register[/:action]',
'defaults' => array(
'controller' => 'Application\Controller\Register',
'action' => 'index',
),
),
),
'verify' => array(
'type' => 'Segment',
'options' => array(
'route' => 'verify[/:code]',
'constraints' => array(
'code' => '[a-zA-Z][a-zA-Z0-9_-]*',
),
'defaults' => array(
'controller' => 'Application\Controller\Verify',
'action' => 'index',
),
),
),
),
),
),
),
(唯一の/設定ページ上で発生する)であるが、私は完全にこれを記述する方法についてはよく分かりません。私はホーム/セットアップルート(セットアップ)ですが、再度、explode()についての警告を受けています。
これが関連しているが、ここで私の見解であれば、私にはわからない:
<div class="w3-row">
<div class="w3-col w3-container m8 l9">
<?php
$this->form->setAttribute('action', $this->url(array(
'home/setup', array('action' => 'index'),
)));
$this->form->prepare();
echo $this->form()->openTag($this->form);
?>
<?php
$username = $this->form->get('username');
$password = $this->form->get('password');
echo $this->formRow($username);
echo $this->formRow($password);
echo $this->formElement($this->form->get('csrf_security'));
echo $this->formElement($this->form->get('submit'));
echo $this->form()->closeTag();
?>
</div>
感謝を!