私人服务器上的CodeIgniter错误系统路径 [英] CodeIgniter incorrect system path on private server
问题描述
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';
推荐答案
在过去40多年的时间里,我从未见过如此糟糕的产品交付.互联网搜索解决配置/设计问题只会使解决方案的工作变得更糟.
I've never in 40+ years of doing this seen a product delivery as bad as this one. And the internet searches to resolve configuration/design issues just makes the solution effort even worse.
试图使该产品正常工作一直是一场噩梦.这使Spring Boot看起来是有史以来产品交付方面的最大改进!!
Trying to get this product to work has been a absolute nightmare. This makes Spring Boot look like the greatest improvement in product delivery ever!!
如果您想将某些内容强加到SaaS中,这就是完成它的方法.
If you want to force some into SaaS this is the way to get it done.
这篇关于私人服务器上的CodeIgniter错误系统路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!