1
0
قرینه از https://github.com/matomo-org/matomo.git synced 2025-08-22 15:07:44 +00:00
Files
matomo/tests/PHPUnit/Integration/Http/HttpAuthentication.php
2023-05-15 08:48:25 +02:00

12 خطوط
325 B
PHP

<?php
if (isset($_SERVER['PHP_AUTH_USER']) && $_SERVER['PHP_AUTH_USER'] == 'test' && $_SERVER['PHP_AUTH_PW'] == 'test') {
echo 'Authentication successful';
exit;
} else {
header('WWW-Authenticate: Basic realm="TestAuth"');
header('HTTP/1.0 401 Unauthorized');
echo 'Authentication required';
exit;
}