로그 생성이 안되어 테스트 및 수정본
This commit is contained in:
18
public/test_log.php
Normal file
18
public/test_log.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
// 간단한 테스트
|
||||
$writablePath = realpath(__DIR__ . '/../writable/logs');
|
||||
echo "writable/logs 경로: " . $writablePath . "<br>";
|
||||
echo "writable/logs 쓰기 가능: " . (is_writable($writablePath) ? 'YES' : 'NO') . "<br>";
|
||||
echo "writable/logs 소유자: ";
|
||||
system("ls -ld " . $writablePath);
|
||||
echo "<br>";
|
||||
|
||||
// 직접 파일 쓰기 테스트
|
||||
$testFile = $writablePath . '/test-' . date('Y-m-d') . '.log';
|
||||
$result = file_put_contents($testFile, date('Y-m-d H:i:s') . " - Direct write test\n", FILE_APPEND);
|
||||
echo "직접 쓰기 결과: " . ($result !== false ? 'SUCCESS' : 'FAILED') . "<br>";
|
||||
echo "테스트 파일: " . $testFile . "<br>";
|
||||
|
||||
if (file_exists($testFile)) {
|
||||
echo "파일 내용:<pre>" . file_get_contents($testFile) . "</pre>";
|
||||
}
|
||||
Reference in New Issue
Block a user