douyi7283 2014-12-15 09:09
浏览 72

POST数据始终为NULL,适用于dev

I'm having an weird issue. A website just suddenly stopped working correctly. Every time I try to post a form all input is NULL. This used to work (on live) and nothing has changed (code-wise). At first I thought I was hacked or something, but I tested on my local machine and all works fine. So it shouldn't be my code

My question is then: what could be causing the problem? I'm using Laravel 4.1 and it's on an Apache server (my local environment is also Apache). My guess is, it's something on the server, since my code works as expected on localhost.

Route:

Route::post('user/login', array('as'=>'user.login','uses'=>'UserController@postLogin'));

Postlogin:

public function postLogin()
{
    var_dump($_POST);

View:

<form method="POST" action="http://example.com/user/login" accept-charset="UTF-8"><input name="_token" type="hidden" value="xxxxxxxxxxxxxxx">
            <div class="form-row">
        <div class="form-item form-item-100 f-left">
            <input 
                type="email" 
                name="email" 
                placeholder="Email" 
                value="" 
            >
        </div>
        <div class="clearfix"></div>
    </div>

    <div class="form-row">
        <div class="form-item form-item-100 f-left">
            <input 
                type="password" 
                name="password" 
                placeholder="Password"  
            >
        </div>
        <div class="clearfix"></div>
    </div>

    <div class="form-row">
        <div class="form-item form-item-40 f-left">
            <button class="btn btn-green form-submit" type="submit">Log in</button>
        </div>
        <div class="clearfix"></div>
    </div>
</form>
  • 写回答

1条回答 默认 最新

  • duanqizao6492 2014-12-16 13:02
    关注

    Turns out the problem was indeed with the hosting. The exact details of what the problem was are unknown to me...

    评论

报告相同问题?

悬赏问题

  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP