<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="http://jzaefferer.github.com/jquery-validation/jquery.validate.js"></script>
<?php $this->load->view('includes/header'); ?>
<div class="container-fluid" style=" min-height: 500px; " >
<div class="row-fluid">
<?php $this->load->view('includes/sidebar'); ?>
<?php $this->load->view($main_content); ?>
</div>
</div>
<form id="print" method="post" action="<?php echo base_url().'index.php/'; ?>printdocument/print_a_document">
<div class="controls">
<input style="width: 185px;" id="print_button" type="submit" value="Print">
<input type="hidden" name="print_template" value="<?php echo $main_content; ?>">
<input type="hidden" name="records" value="<?php echo $records; ?>">
<input type="hidden" name="print_template" value="<?php echo $main_content; ?>">
</div>
</form>
然后在控制器中
class Printdocument extends CI_Controller{
function print_a_document()
{
$data['main_content'] = $this->input->post('print_template');
$data['records'] = $this->input->post('records');
$this->load->view('includes/print_template', $data);
}
}
我需要传递记录 如何传递?
遇到 PHP 错误
严重性:通知
消息:数组到字符串的转换
文件名:includes/template_print.php
行号:16
数组">