문제

I have a simple question about ZF2. Why when and send a post to another method my post data is changed. I mean :

<input name="auth.mode" type="text"/>
<input name="block.seconds" type="text" />

It suppose get :

array(2) {
  ["auth.mode"] => string(1) "A"
  ["block.seconds"] => string(0) "12"
}

But I get :

array(2) {
  ["auth_mode"] => string(1) "A"
  ["block_seconds"] => string(0) "12"
}

I do not need my keys changed. I need my keys as in the HTML form with this name. Help please.

도움이 되었습니까?

해결책

PHP is making this change, not ZF. You can't have dots in the $_POST etc. array key names, so PHP automatically converts them to underscores.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top