dora1989 2015-03-04 16:15
浏览 28

致命错误:在DigitalOcean中使用时,CodeIgniter中找不到类'AppioLab \ LRPC \ Lrpc'

I am using Composer with CodeIgniter in my vagrant. My development environment is CentOS 6.5, PHP 5.6. I've loaded my other package from github through composer.json and in my development environment everything working fine. When I loaded the full folder in my DigitalOcean VPS and try to run the application,
I got this Fatel error.

Fatal error: Class 'AppioLab\LRPC\Lrpc' not found in /var/www/html/personal/demo/lstoxero/public_html/application/controllers/mytest.php on line 43

Line 43 is where I am trying to create an instance of Class I've loaded through composer and autoload.php

This is my folder structure
enter image description here

This is my Test Controller

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


    use AppioLab\LRPC\Lrpc;

    error_reporting(E_ALL);
    ini_set('display_errors', 1);

    class MyTest extends CI_Controller {

        public function test(){

            echo "Cron Test<br>";
            $lrpc = new Lrpc(); // this is line 43 in my code.
            echo "lrpc loadedt<br>";
        }

    }

When I try to access this test function with url http://mydemosite.com/MyTest/test i get the error I mention above. What I am doing wrong and why its running in vagrant but not in live which is also CentOS 6.5?

Your answer may help me solve it quickly. Thanks in Advance.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 微信会员卡接入微信支付商户号收款
    • ¥15 如何获取烟草零售终端数据
    • ¥15 数学建模招标中位数问题
    • ¥15 phython路径名过长报错 不知道什么问题
    • ¥15 深度学习中模型转换该怎么实现
    • ¥15 HLs设计手写数字识别程序编译通不过
    • ¥15 Stata外部命令安装问题求帮助!
    • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
    • ¥15 TYPCE母转母,插入认方向
    • ¥15 如何用python向钉钉机器人发送可以放大的图片?