<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 私有服务器上的系统路径不正确

      时间:2024-04-12

        <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 私有服务器上的系统路径不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:如何在 XAMPP for Windows 上安装 V8Js for PHP? 下一篇:Codeigniter SMTP 无法连接

                相关文章

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

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

                  1. <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>