2019-06-24 09:10
浏览 41


I am not calling a page in codeiginiter when i click button..

i am new in this so please HELP....

<a href="#"><i class="fa fa-check-square-o nav_icon"></i>Forms<span class="fa arrow"></span></a>
<ul class="nav nav-second-level collapse">
        <a href="<?php echo base_url('application/views/middlepage/inputs.php'); ?>">Inputs</a>
        <a href="<?php echo base_url('application/views/middlepage/validation.php'); ?>">Form Validation</a>

on theme implement in codeiginiter i can't call the page it's is show the page was not found but i given correct path on it.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

3条回答 默认 最新

  • duanbi7204
    duanbi7204 2019-06-24 10:49

    First you have to understand MVC Architecture..

    You just have to call Controller/Method where you call your view. example:


    class Mycontroller extends CI_Controller{
       public function orders(){

    view - Orderpage.php

    <h3>orders list</h3>

    your just have to add anchor tag like

    <a href="<?php echo base_url('mycontroller/orders');?>">Go to orders</a>
    点赞 评论
  • douzhi8488
    douzhi8488 2019-06-24 10:17

    Edit config/config.php file

    $config['base_url'] = 'http://' . $_SERVER['HTTP_HOST'] . '/codeigniter/';

    in view

    <a href="<?php echo base_url('Controller_name/function_name'); ?>">Inputs</a>

    点赞 评论
  • doushui3216
    doushui3216 2019-06-24 12:40

    you need to setup routs for View go to


    and add a route at the end like this

    $route['ViewName'] = 'ViewPath';

    My views are presented in


    so i will add

    $route['confirm'] = 'user/confirm';
    点赞 评论