代码之家  ›  专栏  ›  技术社区  ›  Solivan

Laravel无法提交表单

  •  0
  • Solivan  · 技术社区  · 6 年前

    我不知道为什么,什么时候会发生。提交表单错误时,我的网站中的所有内容都正常 Parse error: syntax error, unexpected 'text' (T_STRING), expecting ',' or ')' 将被展示。请参阅此链接中的错误: Click on submit . 我怎么修它

                <form method="post"  action="{{ Route('pay')}}">
                {{ csrf_field() }}
                <input type="hidden" name="offerid" value="1"/>
                <button  type="submit" class="btn btn-primary btn-lg col-lg-12  col-sm-12 col-xs-12" role="button">submit</button>
            </form>
    

    提交所有表单(如Laravel登录表单和…)时会显示此错误。

    1 回复  |  直到 6 年前
        1
  •  2
  •   Saman Ahmadi    6 年前

    您不应该更改供应商文件夹中的任何文件。

    回滚更改。

    或者复制我的默认代码:

    $this->setContent(
                sprintf('<!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8" />
            <meta http-equiv="refresh" content="0;url=%1$s" />
    
            <title>Redirecting to %1$s</title>
        </head>
        <body>
            Redirecting to <a href="%1$s">%1$s</a>.
        </body>
    </html>', htmlspecialchars($url, ENT_QUOTES, 'UTF-8')));
    
    推荐文章