问题描述
CodeIgniter表单操作导致问题。
当我在不带index.PHP的操作网址下编写代码时,它在Chrome上运行良好,而在Firefox上运行不正常
<form method="POST" action="Login/Loginme">
但是,当我使用index.PHP在操作URL下面编写代码时,它不能在chrome上运行,也不能在firefox上运行。
<form method="POST" action="index.PHP/Login/Loginme">
解决方法
使用site_url();
<form method="POST" action="<?php echo site_url('Login/Loginme'); ?>">
,
使用base_url()后跟控制器是最佳实践。例如。 base_url('myController/myFunction')