codeigniter 您的应用程序文件夹路径似乎设置不正确,请打开以下文件并更正此错误:index.php

piok6c0g  于 2022-12-07  发布在  PHP
关注(0)|答案(4)|浏览(126)

系统过去工作正常,但后来出现了这个错误,我不知道解决方案,因为我对这个平台还是个新手;但我已经检查了类似的问题,建议它是由于丢失的文件目录。有什么建议吗?
附件为文件结构;这些文件位于系统文件Files structure

daolsyd0

daolsyd01#

发生这种情况的原因如下。

  • 您的system文件夹可能丢失
  • 检查您对文件夹的权限
  • 打开index.php文件并找到$system_path和

$应用程序文件夹。
$system_path = 'system'; $application_folder = 'application';

e5njpo68

e5njpo682#

指向你的系统文件夹正确,如果它是不同的目录调整index.php
例如,

$system_path = 'system';

$system_path = '../system';

$system_path = '../../system';
zfycwa2u

zfycwa2u3#

发生这种情况的原因如下。

your system folder might be missing

1.开放式配置
1.和config.php的配置文件
1.搜索$config ['索引页']='';
1.最后一个搜索输入index.php例如$config ['index_page']= 'index.php';

zsbz8rwp

zsbz8rwp4#

如果您使用的是CI4,请在项目主目录中创建index.php:

<?php

// Path to the front controller (this file)
define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR);

// Ensure the current directory is pointing to the front controller's directory
chdir(__DIR__);

// Load our paths config file
// This is the line that might need to be changed, depending on your folder structure.
$pathsConfig = FCPATH . 'app/Config/Paths.php';
// ^^^ Change this if you move your application folder
require realpath($pathsConfig) ?: $pathsConfig;

$paths = new Config\Paths();

// Location of the framework bootstrap file.
$bootstrap = rtrim($paths->systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'bootstrap.php';
$app       = require realpath($bootstrap) ?: $bootstrap;

  
$app->run();

相关问题