질문 Q #22995
ci4 사용중인데 자꾸 index.php에서 paths.php를 열수없다고 나오네요
Luten 2021-01-08 11:33:04

Warning: require(/host/home3/newhost/html/../app/Config/Paths.php): failed to open stream: No such file or directory in /host/home3/newhost/html/index.php on line 32

Warning: require(/host/home3/newhost/html/../app/Config/Paths.php): failed to open stream: No such file or directory in /host/home3/newhost/html/index.php on line 32

Fatal error: require(): Failed opening required '/host/home3/newhost/html/../app/Config/Paths.php' (include_path='.:/usr/share/pear:/usr/share/php') in /host/home3/newhost/html/index.php on line 32

접속하면 index.php에서 열수없다고 나오면서 제대로 실행이 되지가 않네요.

 

<?php

$minPHPVersion = '7.2';

if (phpversion() < $minPHPVersion)

{

die("Your PHP version must be {$minPHPVersion} or higher to run CodeIgniter. Current version: " . phpversion());

}

unset($minPHPVersion);

define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR);

$pathsPath = realpath(FCPATH . '/host/home3/newhost/html/app/Config/Paths.php') ?: FCPATH . '/host/home3/newhost/html/app/Config/Paths.php';

chdir(__DIR__);

require $pathsPath;(오류뜨는 문구)

$paths = new Config\Paths();

$app = require rtrim($paths->systemDirectory, '/ ') . '/bootstrap.php';

 

$app->run();

 

index.php의 전문입니다.

어떻게 해결해야하나요?

답변 5
#1 변종원(웅파) 2021-01-08 12:15:36

패스를 안맞춰주니 못찾는 겁니다.

$pathsPath = realpath(FCPATH . '../app/Config/Paths.php');

FCPATH 를 출력해보시고 위 패스를 그에 맞게 수정하세요.

 

#2 Luten 2021-01-08 12:25:59
변종원(웅파) / 지금 써놓은 경로전에 이미 적어주신 코드를 이미 사용한적이 있는데... 똑같이 나오더라고요...
#3 한대승(불의회상) 2021-01-08 12:56:45
$pathsPath 값을 출력해 보면 답이 나올듯
#4 Luten 2021-01-08 14:09:33
아 경로를 다시 구체화하니 수정되었네요. 감사합니다
#5 테러보이 2021-01-08 16:24:32
자고로 index.php는 수정하는게....