
`apache_get_modules` 함수는 Apache 모듈의 이름을 대문자로 반환합니다. 따라서 `mod_authz_host` 모듈의 이름은 `AUTHZ_HOST`로 반환됩니다.
이 문제를 해결하려면 `apache_get_modules` 함수의 반환값을 대문자로 비교하거나, 모듈 이름을 대문자로 변환하여 비교하는 방법을 사용할 수 있습니다.
예를 들어, 다음과 같이 코드를 수정할 수 있습니다.
#hostingforum.kr
php
$modules = apache_get_modules();
foreach ($modules as $module) {
if (strtoupper($module) == 'AUTHZ_HOST') {
// 모듈이 발견되었습니다.
}
}
또는, 모듈 이름을 대문자로 변환하여 비교할 수 있습니다.
#hostingforum.kr
php
$modules = apache_get_modules();
foreach ($modules as $module) {
if (strtolower($module) == 'mod_authz_host') {
// 모듈이 발견되었습니다.
}
}
이러한 방법을 사용하면 `apache_get_modules` 함수로 반환된 모듈 목록에서 `mod_authz_host` 모듈을 찾을 수 있습니다.
2025-03-26 22:13