[英]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.