php - 在codeigniter 3中传递参数以查看无限循环/页面刷新
问题描述
我对 CodeIgniter 3 有一些问题。当我尝试使用这些参数访问 URL 时http://localhost/crm/Customer/update/3
结果是无限循环页面刷新。如果我访问其他视图或 URL,则不会发生这种情况。
例如 :http://localhost/crm/Customer/list
下面是我的控制器文件:
class Customer extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->helper(array('form', 'url', 'customer'));
$this->load->database();
$this->load->library('session');
$this->load->model(array('Auth', 'Model_customer'));
$this->_init();
}
function _init() {
$this->output->set_template('index');
// $this->load->section('sidebar','template/sidebar');
}
public function index(){
...
$this->load->view('customer/index');
}
function update($id) {
// TEST
$data['id'] = $id;
$this->load->view('customer/update2', $data);
}
}
任何帮助都是有价值的。谢谢
解决方案
推荐阅读
- python - asyncio:调度其他工作项的工作项
- angular - 使用订阅函数获取无法读取未定义
- ibm-midrange - 系统周期时态表和 FOREIGN KEY... ON DELETE CASCADE
- arrays - 使用字符串更新 UIlabel 文本
- javascript - 覆盖默认快速路由 URL 处理程序
- blob - 二进制文件和 BLOB 的区别
- android - 使用通知恢复单实例活动
- r - sparklyr:validate_java_version_line(master,version)中的错误
- ios - iOS 核心位置标题和课程更改
- css - 使用媒体查询交换图像并将它们居中