我想创建一个详细信息页面,但当我单击按钮examp_title
时,我无法移动到Tryout/soal。
谢谢
控制器(Tryout.php(
public function deskripsi($tryout_id)
{
$data['tryout'] = $this->M_tryout->deskripsi_to($tryout_id)->row();
$data['exam_tpa'] = $this->M_tryout->get_exam_tpa($tryout_id)->result();
$data['exam_tps'] = $this->M_tryout->get_exam_tps($tryout_id)->result();
$this->load->view('tryout/deskripsi', $data);
}
public function soal($exam_code)
{
$data['soal'] = $this->M_tryout->get_soal_tryout($exam_code)->result;
$this->load->view('tryout/soal', $data);
}
查看(deskripsi.php(
<?php foreach ($exam_tps as $key => $value) { ?>
<h5 class="fw-bold" class="sub_to">
<a href="<?php base_url('tryout/soal/') ?>
<?php echo $exam->exam_code?>">
<?php echo $value->exam_title;?>
</a>
</h5>
<p>
<?php echo $value->exam_duration;?> Menit,
<?php echo $value->exam_count_question;?> soal <br> Pembahasan
</p>
<?php } ?>
由于缺少echo
,您的<a>
标记似乎没有输出您想要的链接
我已经简化了下面的href
。。。
<h5 class="fw-bold" class="sub_to">
<a href="<?php echo base_url('tryout/soal/') . $exam->exam_code ?>">
<?php echo $value->exam_title; ?>
</a>
</h5>