首页 > 解决方案 > 如何在代码点火器中解决这个表单动作问题?

问题描述

CodeIgniter 表单操作会导致问题。

当我在没有 index.php 的情况下写下面的操作 URL 时,它在 Chrome 上运行良好,而不是在 firefox 上

<form method="POST" action="Login/Loginme">

但是当我在下面用 index.php 编写操作 URL 时,它不会在 chrome 上运行并在 firefox 上运行。

<form method="POST" action="index.php/Login/Loginme">

标签: codeigniter-3

解决方案


利用site_url();

<form method="POST" action="<?php echo site_url('Login/Loginme'); ?>">

推荐阅读