<legend id='JAXzR'><style id='JAXzR'><dir id='JAXzR'><q id='JAXzR'></q></dir></style></legend>

    <tfoot id='JAXzR'></tfoot>
    <i id='JAXzR'><tr id='JAXzR'><dt id='JAXzR'><q id='JAXzR'><span id='JAXzR'><b id='JAXzR'><form id='JAXzR'><ins id='JAXzR'></ins><ul id='JAXzR'></ul><sub id='JAXzR'></sub></form><legend id='JAXzR'></legend><bdo id='JAXzR'><pre id='JAXzR'><center id='JAXzR'></center></pre></bdo></b><th id='JAXzR'></th></span></q></dt></tr></i><div id='JAXzR'><tfoot id='JAXzR'></tfoot><dl id='JAXzR'><fieldset id='JAXzR'></fieldset></dl></div>

        <bdo id='JAXzR'></bdo><ul id='JAXzR'></ul>
    1. <small id='JAXzR'></small><noframes id='JAXzR'>

    2. CodeIgniter 私有服务器上的系统路径不正确

      CodeIgniter incorrect system path on private server(CodeIgniter 私有服务器上的系统路径不正确)

        <tbody id='Zydjw'></tbody>
        <bdo id='Zydjw'></bdo><ul id='Zydjw'></ul>

          <legend id='Zydjw'><style id='Zydjw'><dir id='Zydjw'><q id='Zydjw'></q></dir></style></legend>
            <i id='Zydjw'><tr id='Zydjw'><dt id='Zydjw'><q id='Zydjw'><span id='Zydjw'><b id='Zydjw'><form id='Zydjw'><ins id='Zydjw'></ins><ul id='Zydjw'></ul><sub id='Zydjw'></sub></form><legend id='Zydjw'></legend><bdo id='Zydjw'><pre id='Zydjw'><center id='Zydjw'></center></pre></bdo></b><th id='Zydjw'></th></span></q></dt></tr></i><div id='Zydjw'><tfoot id='Zydjw'></tfoot><dl id='Zydjw'><fieldset id='Zydjw'></fieldset></dl></div>

            <small id='Zydjw'></small><noframes id='Zydjw'>

                <tfoot id='Zydjw'></tfoot>
              • 本文介绍了CodeIgniter 私有服务器上的系统路径不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                上传到服务器时的codeigniter项目给我以下错误.

                codeigniter project when uploaded to server gives me the following error.

                您的系统文件夹路径似乎设置不正确.请打开以下文件并更正:index.php

                Your system folder path does not appear to be set correctly. Please open the following file and correct this: index.php

                在本地运行良好 &在 000webhost.com 托管.

                it is working well locally & on 000webhost.com hosting.

                当上传到并行的私人服务器时,它会出现上述错误.

                When uploaded to private server of parallels it gives the above error.

                我的index.php如下.

                My index.php is as follows.

                <?php
                define('ENVIRONMENT', 'development');
                
                if (defined('ENVIRONMENT'))
                {
                switch (ENVIRONMENT)
                {
                    case 'development':
                        error_reporting(E_ALL);
                    break;
                
                    case 'testing':
                    case 'production':
                        error_reporting(0);
                    break;
                
                    default:
                        exit('The application environment is not set correctly.');
                }
                 }
                $system_path = 'system';
                $application_folder = 'application';
                
                
                if (defined('STDIN'))
                {
                    chdir(dirname(__FILE__));
                }
                
                if (realpath($system_path) !== FALSE)
                {
                    $system_path = realpath($system_path).'/';
                }
                
                $system_path = rtrim($system_path, '/').'/';
                
                if ( ! is_dir($system_path))
                {
                    exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
                }
                
                define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
                define('EXT', '.php');
                
                // Path to the system folder
                define('BASEPATH', str_replace("\", "/", $system_path));
                
                // Path to the front controller (this file)
                define('FCPATH', str_replace(SELF, '', __FILE__));
                
                // Name of the "system folder"
                define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
                
                
                // The path to the "application" folder
                if (is_dir($application_folder))
                {
                    define('APPPATH', $application_folder.'/');
                }
                else
                {
                    if ( ! is_dir(BASEPATH.$application_folder.'/'))
                    {
                        exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF);
                    }
                
                    define('APPPATH', BASEPATH.$application_folder.'/');
                }
                 require_once BASEPATH.'core/CodeIgniter.php';
                

                推荐答案

                我改变了我的 define('ENVIRONMENT', 'development');

                if ($_SERVER['SERVER_ADDR'] == '192.168.0.1' || $_SERVER['HTTP_HOST'] == 'localhost')
                {
                    define('ENVIRONMENT', 'development');
                }
                else
                {
                    define('ENVIRONMENT', 'production');
                }
                

                它对我有用.

                参考来自这里

                这篇关于CodeIgniter 私有服务器上的系统路径不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                <small id='cp9U8'></small><noframes id='cp9U8'>

                  <bdo id='cp9U8'></bdo><ul id='cp9U8'></ul>
                      <tbody id='cp9U8'></tbody>
                          <tfoot id='cp9U8'></tfoot>

                        • <legend id='cp9U8'><style id='cp9U8'><dir id='cp9U8'><q id='cp9U8'></q></dir></style></legend>

                          <i id='cp9U8'><tr id='cp9U8'><dt id='cp9U8'><q id='cp9U8'><span id='cp9U8'><b id='cp9U8'><form id='cp9U8'><ins id='cp9U8'></ins><ul id='cp9U8'></ul><sub id='cp9U8'></sub></form><legend id='cp9U8'></legend><bdo id='cp9U8'><pre id='cp9U8'><center id='cp9U8'></center></pre></bdo></b><th id='cp9U8'></th></span></q></dt></tr></i><div id='cp9U8'><tfoot id='cp9U8'></tfoot><dl id='cp9U8'><fieldset id='cp9U8'></fieldset></dl></div>