我在我的网站上使用symfony2,我有一个注册表单。在我的本地本地环境中一切正常,但是当我在实时服务器上更新它时,当我绑定创建新用户时,请求为空。
这是我的代码:
<form role="form" action="{{ path('register_response') }}" method="post" {{ form_enctype(form) }}>
<div class="form-group {{ firstNameError }}">
{{ form_label(form.first_name, first_name) }}
{{ form_widget(form.first_name, { 'attr': { 'class': 'form-control', 'placeholder' : first_name} }) }}
{{ form_errors(form.first_name) }}
</div>
<div class="form-group {{ lastNameError }}">
{{ form_label(form.last_name, last_name) }}
{{ form_widget(form.last_name, { 'attr': { 'class': 'form-control', 'placeholder' : last_name} }) }}
{{ form_errors(form.last_name) }}
</div>
<div class="form-group {{ emailError }}">
{{ form_label(form.email, email_address) }}
{{ form_widget(form.email, { 'attr': { 'class': 'form-control', 'placeholder' : 'email@example.com'} }) }}
{{ form_errors(form.email) }}
</div>
<div class="form-group {{ passError }}">
{{ form_label(form.password, password) }}
{{ form_widget(form.password, { 'attr': { 'class': 'form-control', 'placeholder' : password} }) }}
{{ form_errors(form.password) }}
</div>
<div class="form-group {{ repeatPassError }}">
{{ form_label(form.repeat_password, repeat_password) }}
{{ form_widget(form.repeat_password, { 'attr': { 'class': 'form-control', 'placeholder' : repeat_password} }) }}
{{ form_errors(form.repeat_password) }}
</div>
<div class="form-group">
{{ form_label(form.country, country) }}
{{ form_widget(form.country, { 'attr': { 'class': 'form-control'} }) }}
{{ form_errors(form.country) }}
</div>
<div class="form-group {{ cityError }}">
{{ form_label(form.city, city) }}
{{ form_widget(form.city, { 'attr': { 'class': 'form-control', 'placeholder' : city} }) }}
{{ form_errors(form.city) }}
</div>
<div class="form-group {{ zipError }}">
{{ form_label(form.zip_code, zip_code) }}
{{ form_widget(form.zip_code, { 'attr': { 'class': 'form-control', 'placeholder' : zip_code} }) }}
{{ form_errors(form.zip_code) }}
</div>
<div class="form-group {{ addressError }}">
{{ form_label(form.address, address) }}
{{ form_widget(form.address, { 'attr': { 'class': 'form-control', 'placeholder' : address} }) }}
{{ form_errors(form.address) }}
</div>
<button class="btn btn-default" type="submit">{{ register }}</button>
</form>
以下是来自服务器
的请求的图片
以下是我当地环境要求的图片: