doufangxie0203 2016-10-03 11:36
浏览 197

找不到对象! 在此server-codeigniter 3.1.0上找不到请求的URL

Pages.php in controller folder

<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Pages extends CI_Controller {

    public function index() {
        $this->load->view('header');
        $this->load->view('home');
        $this->load->view('footer');
    }
    public function fivespecies() {
        $this->load->view('header');
        $this->load->view('fivespecies');
        $this->load->view('footer');
    }
    
}

autoload.php in config folder

<?php
defined('BASEPATH') OR exit('No direct script access allowed');




$autoload['packages'] = array();


$autoload['libraries'] = array();


$autoload['drivers'] = array();


$autoload['helper'] = array('url');


$autoload['config'] = array();


$autoload['language'] = array();


$autoload['model'] = array();

config.php in config folder

<?php
defined('BASEPATH') OR exit('No direct script access allowed');


$config['base_url'] = 'http://localhost/antimalarial/';


$config['index_page'] = '';


$config['uri_protocol'] = 'REQUEST_URI';


$config['url_suffix'] = '';


$config['language'] = 'english';


$config['charset'] = 'UTF-8';


$config['enable_hooks'] = FALSE;


$config['subclass_prefix'] = 'MY_';


$config['composer_autoload'] = FALSE;


$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';


$config['allow_get_array'] = TRUE;
$config['enable_query_strings'] = FALSE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd';


$config['log_threshold'] = 0;


$config['log_path'] = '';


$config['log_file_extension'] = '';


$config['log_file_permissions'] = 0644;


$config['log_date_format'] = 'Y-m-d H:i:s';


$config['error_views_path'] = '';


$config['cache_path'] = '';


$config['cache_query_string'] = FALSE;

$config['encryption_key'] = '';


$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;


$config['cookie_prefix']    = '';
$config['cookie_domain']    = '';
$config['cookie_path']      = '/';
$config['cookie_secure']    = FALSE;
$config['cookie_httponly']  = FALSE;


$config['standardize_newlines'] = FALSE;


$config['global_xss_filtering'] = FALSE;


$config['csrf_protection'] = FALSE;
$config['csrf_token_name'] = 'csrf_test_name';
$config['csrf_cookie_name'] = 'csrf_cookie_name';
$config['csrf_expire'] = 7200;
$config['csrf_regenerate'] = TRUE;
$config['csrf_exclude_uris'] = array();


$config['compress_output'] = FALSE;


$config['time_reference'] = 'local';


$config['rewrite_short_tags'] = FALSE;


$config['proxy_ips'] = '';

routes.php in config folder

<?php
defined('BASEPATH') OR exit('No direct script access allowed');


$route['default_controller'] = 'pages';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
$route['(:any)'] = 'pages/$1/$1';

header.php

<!-- === BEGIN HEADER === -->
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
    <!--<![endif]-->
    <head>
        <!-- Title -->
        <title>Database for antimalarial Drug</title>
        <!-- Meta -->
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <meta name="description" content="">
        <meta name="author" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
        <!-- Favicon -->
        <link href="favicon.ico" rel="shortcut icon">
        <!-- Bootstrap Core CSS -->
        <link rel="stylesheet" href="assets/css/bootstrap.css" rel="stylesheet">
        <!-- Template CSS -->
        <link rel="stylesheet" href="assets/css/animate.css" rel="stylesheet">
        <link rel="stylesheet" href="assets/css/font-awesome.css" rel="stylesheet">
        <link rel="stylesheet" href="assets/css/nexus.css" rel="stylesheet">
        <link rel="stylesheet" href="assets/css/responsive.css" rel="stylesheet">
        <link rel="stylesheet" href="assets/css/custom.css" rel="stylesheet">
        <!-- Google Fonts-->
        <link href="http://fonts.googleapis.com/css?family=Roboto+Condensed:400,300" rel="stylesheet" type="text/css">
    </head>
    <body>
        <div id="body-bg">
            <!-- Phone/Email -->
            <div id="pre-header" class="background-gray-lighter">
                <div class="container no-padding">
                    <div class="row hidden-xs">
                        <div class="col-sm-6 padding-vert-5">
                            <strong>Phone:</strong>&nbsp;9030051219
                        </div>
                        <div class="col-sm-6 text-right padding-vert-5">
                            <strong>Email:</strong>&nbsp;bioinformatics1416@gmail.com
                        </div>
                    </div>
                </div>
            </div>
            <!-- End Phone/Email -->
            <!-- Header -->
            <div id="header">
                <div class="container">
                    <div class="row">
                        <!-- Logo -->
                        <div class="logo">
                            <a href="index.html" title="">
                                <img src="assets/img/logo1.png" alt="Logo" />
                            </a>
                        </div>
                        <!-- End Logo -->
                    </div>
                </div>
            </div>
            <!-- End Header -->
            <!-- Top Menu -->
            <div id="hornav" class="bottom-border-shadow">
                <div class="container no-padding border-bottom">
                    <div class="row">
                        <div class="col-md-8 no-padding">
                            <div class="visible-lg">
                                <ul id="hornavmenu" class="nav navbar-nav">
                                    <li>
                                        <a href="<?php echo base_url() ?>home">home</a>
                                    </li>
                                    <li>
                                        <span class="fa-gears ">Malaria</span>
                                        <ul>
                                            
                                            
                                    
                                            <li>
                                                <a href="<?php echo base_url() ?>fivespecies">fiveSpecies</a>
                                            </li>
                                            <li>
                                                <a href="features-accordions-tabs.html">Parasite life cycle</a>
                                            </li>
                                            <li>
                                                <a href="features-buttons.html">Definite and symptoms</a>
                                            </li>
                                            <li>
                                                <a href="features-carousels.html">Current tools</a>
                                            </li>
                                            <li>
                                                <a href="features-grid.html">Malaria Treatment</a>
                                            </li>
                                            <li>
                                                <a href="features-animate-on-scroll.html">History of antimalarials</a>
                                            </li>
                                        </ul>
                                    </li>
                                    <li>
                                        <span class="fa-copy ">Access</span>
                                        <ul>
                                            <li>
                                                <a href="pages-about-us.html">Areas of work</a>
                                            </li>
                                            <li>
                                                <a href="pages-services.html">Map of Projects</a>
                                            </li>
                                            <li>
                                                <a href="pages-faq.html">Products</a>
                                            </li>
                                            <li>
                                                <a href="pages-about-me.html">Tool kits</a>
                                            </li>
                                            <li>
                                                <a href="pages-full-width.html">Global malaria mapper</a>
                                            </li>
                                            <li>
                                                <a href="pages-left-sidebar.html">Access interviews</a>
                                            </li>
                                        </ul>
                                    </li>
                                    <li>
                                        <span class="fa-th ">News room</span>
                                        <ul>
                                            <li>
                                                <a href="portfolio-2-column.html">News</a>
                                            </li>
                                            <li>
                                                <a href="portfolio-3-column.html">Press Releases</a>
                                            </li>
                                            <li>
                                                <a href="portfolio-4-column.html">Publications</a>
                                            </li>
                                            <li>
                                                <a href="portfolio-6-column.html">Events</a>
                                            </li>
                                        </ul>
                                    </li>
                                    <li>
                                        <span class="fa-font ">Blog</span>
                                        <ul>
                                            <li>
                                                <a href="blog-list.html">Blog</a>
                                            </li>
                                            <li>
                                                <a href="blog-single.html">Blog Single Item</a>
                                            </li>
                                        </ul>
                                    </li>
                                    <li>
                                        <a href="contact.html" class="fa-comment ">Drugs</a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="col-md-4 no-padding">
                            <ul class="social-icons pull-right">
                                <li class="social-youtube">
                                    <a href="https://www.youtube.com/user/MMVMeds4Malaria" target="_blank" title="Youtube"></a>
                                </li>
                                <li class="social-twitter">
                                    <a href="https://twitter.com/MalariaNoMore?lang=en" target="_blank" title="Twitter"></a>
                                </li>
                                <li class="social-facebook">
                                    <a href="https://www.facebook.com/pages/Antimalarial-medication/111604075529955" target="_blank" title="Facebook"></a>
                                </li>
                                <li class="social-googleplus">
                                    <a href="https://plus.google.com/114702323662314783325" target="_blank" title="Google+"></a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <!-- End Top Menu -->
            <!-- === END HEADER === -->

when i click on the fivespecies it is showing(object not found error) image

.htaccess file

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

</div>
  • 写回答

1条回答 默认 最新

  • dragonlew9876 2016-10-03 11:43
    关注

    Change your li item by this,

     <li>
        <a href="<?php echo base_url() ?>Pages/fivespecies">fiveSpecies</a>
     </li>
    
    评论

报告相同问题?

悬赏问题

  • ¥15 安装svn网络有问题怎么办
  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥15 latex怎么处理论文引理引用参考文献