drag2458 2014-05-08 16:34
浏览 25

页面未被识别?

The controller doesn't seem to be recognizing my view page when I try to load it in the browser. The view page itself is called insertjob.php and controller is called client therefore the link should be website_url/client/insertjob.

I have uploaded it to a serve and the home page works but the insert job page doesn't load even though the link is correct.

Controller

public function addjobsform()
{
$this->load->helper('form');
$data['title']="Add a new job";
$this->load->view("insertjob", $data);
}

View

<h1>Welcome to XYZ inc.</h1> 
<p>Find out everything you need to know about the XYZ company</p> 

<div id="nav"
<ul> 
<li><a href="<?php echo site_url('nav/home');?>">Home</a><li>
<li><a href="<?php echo site_url('client/insertjob');?>">Insert</a></li>
</ul>

Model

<?php

class cmodel extends CI_Model {

function __construct()
{
parent:: __construct();   
}

function getjob(){
$query = $this->db->get('client');
return $query->result();
}

}
function addjob($jobtype,$jobinfo)
{
    $newjob=array("jobtype"=>$jobtype,"jobinfo"=>$jobinfo);
    return $this->db->insert('client', $newjob);
}

}
?>
  • 写回答

1条回答 默认 最新

  • dongyanggan3025 2014-05-08 16:48
    关注

    your are using wrong url

    try

    website_url/index.php/client/addjobsform
    

    or

    website_url/index.php/controller/controllerfunction
    
    评论

报告相同问题?

悬赏问题

  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私