简体   繁体   English

网站从本地主机移至服务器时出现Codeigniter错误

[英]Codeigniter error on moving the website from localhost to server

We are using Code Igniter version 2.2 to develop an application. 我们正在使用Code Igniter 2.2版来开发应用程序。 We have created it locally and it works fine however when uploaded onto the server we get the following error: 我们已经在本地创建了它,并且可以正常工作,但是当将其上传到服务器时,会出现以下错误:

An Error Was Encountered Unable to load the requested file: Abc/xyz.php (file name changed for question) 遇到错误,无法加载请求的文件:Abc / xyz.php(文件名更改为问题)

Code in controller: 控制器中的代码:

class Abc extends CI_Controller {

   public function xyz(){

     $this->load->view(__CLASS__."/".__FUNCTION__);

  }

When I modify the code to the following the page appears: 当我将代码修改为以下内容时,将显示页面:

class Abc extends CI_Controller {

   public function xyz(){

       $this->load->view("Abc/xyz");

   }

How can I get the above code run using Class & Function? 如何使用Class&Function运行以上代码?

Thanks for your time & efforts. 感谢您的时间和精力。

您可以使用echo __CLASS__."/".__FUNCTION__在服务器上调试此值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Codeigniter从本地主机移到服务器 - codeigniter moving from localhost to server 将我的Codeigniter站点从实时服务器移动到本地主机时出现问题 - Problem in moving my Codeigniter site from live server to localhost 移动Joomla后出现错误! 网站从本地主机到实时服务器 - Errors after moving Joomla! website to live server from localhost 从localhost转移到生产codeigniter项目 - moving from localhost to production codeigniter project 将wordpress从服务器移动到localhost - Moving wordpress from server to localhost 从本地主机移动到生产服务器时出现错误500 - Error 500 when moving from localhost to production server 将站点从本地主机移动到实时服务器时出现 Wordpress 错误 - Wordpress error while moving site from localhost to live server 使用codeigniter开发的网站在localhost上运行良好,但在实时服务器上出现内部服务器错误500 - website developed with codeigniter working well on localhost but internal server error 500 on live server 从本地主机上传CodeIgniter到网站的问题 - Issues uploading CodeIgniter from localhost to website 将网站从Windows本地主机移到Linux Live服务器:文件名和路径问题 - Moving website from Windows localhost to Linux live server: issues with filenames and paths
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM